Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 6: [PATCH 06/17] feat(wallet): preserve Roots signing and spend controls on v31

src/interfaces/chain.h

Before: src/interfaces/chain.h · After: src/interfaces/chain.h

File metadata
index 20369fd2e2629c21cf1a9c593a3d61b7c7e3b275..34def9a5d676a5c089fc348d81328e56abdca578 100644

Download original patch · Release notes

Diff rows 1–38 of 38. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/interfaces/chain.h CHANGED
@@ -18,6 +18,7 @@
18
18
  #include <map>
19
19
  #include <memory>
20
20
  #include <optional>
21
+ #include <set>
21
22
  #include <string>
22
23
  #include <vector>
23
24
 
@@ -28,6 +29,8 @@ class CFeeRate;
28
29
  class CRPCCommand;
29
30
  class CScheduler;
30
31
  class Coin;
32
+ class CScript;
33
+ class COutPoint;
31
34
  class uint256;
32
35
  enum class MemPoolRemovalReason;
33
36
  enum class RBFTransactionState;
@@ -43,6 +46,14 @@ struct NodeContext;
43
46
 
44
47
  namespace interfaces {
45
48
 
49
+ //! Result of a shared UTXO-set script scan.
50
+ enum class ScanResult {
51
+ SUCCESS,
52
+ BUSY,
53
+ ABORTED,
54
+ UNAVAILABLE,
55
+ };
56
+
46
57
  class Handler;
47
58
  class Wallet;
48
59
 
@@ -175,6 +186,9 @@ public:
175
186
  //! the current chain UTXO set. Iterates through all the keys in the map and
176
187
  //! populates the values.
177
188
  virtual void findCoins(std::map<COutPoint, Coin>& coins) = 0;
189
+ //! Snapshot scan for script matches. Results can become spent before use.
190
+ virtual ScanResult findScriptPubKeys(const std::set<CScript>& needles, std::map<COutPoint, Coin>& coins,
191
+ const std::function<bool()>& should_abort = {}) = 0;
178
192
 
179
193
  //! Estimate fraction of total transactions verified if blocks up to
180
194
  //! the specified block hash are verified.