Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 23: [PATCH 23/68] feat(wallet): add transient private-key sweep RPC

src/interfaces/chain.h

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

File metadata
index 34ab36313d5ed6442e8e25bf1187d59cec00d7c3..2db30863416628cc68e18a7603a8449cc1e522f9 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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

src/interfaces/chain.h CHANGED
@@ -18,6 +18,8 @@
18
  #include <optional>
19
  #include <string>
20
  #include <vector>
 
 
21
 
22
  class ArgsManager;
23
  class CBlock;
@@ -26,6 +28,8 @@ class CFeeRate;
26
  class CRPCCommand;
27
  class CScheduler;
28
  class Coin;
 
 
29
  class uint256;
30
  enum class MemPoolRemovalReason;
31
  enum class RBFTransactionState;
@@ -39,6 +43,14 @@ struct NodeContext;
39
 
40
  namespace interfaces {
41
 
 
 
 
 
 
 
 
 
42
  class Handler;
43
  class Wallet;
44
 
@@ -187,6 +199,8 @@ public:
187
  //! the current chain UTXO set. Iterates through all the keys in the map and
188
  //! populates the values.
189
  virtual void findCoins(std::map<COutPoint, Coin>& coins) = 0;
 
 
190
 
191
  //! Estimate fraction of total transactions verified if blocks up to
192
  //! the specified block hash are verified.
 
18
  #include <optional>
19
  #include <string>
20
  #include <vector>
21
+ #include <map>
22
+ #include <set>
23
 
24
  class ArgsManager;
25
  class CBlock;
 
28
  class CRPCCommand;
29
  class CScheduler;
30
  class Coin;
31
+ class CScript;
32
+ class COutPoint;
33
  class uint256;
34
  enum class MemPoolRemovalReason;
35
  enum class RBFTransactionState;
 
43
 
44
  namespace interfaces {
45
 
46
+ //! Result of a shared UTXO-set script scan.
47
+ enum class ScanResult {
48
+ SUCCESS,
49
+ BUSY,
50
+ ABORTED,
51
+ UNAVAILABLE,
52
+ };
53
+
54
  class Handler;
55
  class Wallet;
56
 
 
199
  //! the current chain UTXO set. Iterates through all the keys in the map and
200
  //! populates the values.
201
  virtual void findCoins(std::map<COutPoint, Coin>& coins) = 0;
202
+ //! Snapshot scan for script matches. Results can become spent before use.
203
+ virtual ScanResult findScriptPubKeys(const std::set<CScript>& needles, std::map<COutPoint, Coin>& coins) = 0;
204
 
205
  //! Estimate fraction of total transactions verified if blocks up to
206
  //! the specified block hash are verified.