Skip to content
Bitcoin Roots

v29.4-roots.4 · Commit 23: [PATCH 23/37] 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 c9ef46243c47c37b0060da9ac6269b5d45c23b0e..ceedf3ef09538bc5679979822029d51a3ff83957 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
@@ -17,6 +17,8 @@
17
  #include <stdint.h>
18
  #include <string>
19
  #include <vector>
 
 
20
 
21
  class ArgsManager;
22
  class CBlock;
@@ -25,6 +27,8 @@ class CFeeRate;
25
  class CRPCCommand;
26
  class CScheduler;
27
  class Coin;
 
 
28
  class uint256;
29
  enum class MemPoolRemovalReason;
30
  enum class RBFTransactionState;
@@ -38,6 +42,14 @@ struct NodeContext;
38
 
39
  namespace interfaces {
40
 
 
 
 
 
 
 
 
 
41
  class Handler;
42
  class Wallet;
43
 
@@ -193,6 +205,8 @@ public:
193
  //! the current chain UTXO set. Iterates through all the keys in the map and
194
  //! populates the values.
195
  virtual void findCoins(std::map<COutPoint, Coin>& coins) = 0;
 
 
196
 
197
  //! Estimate fraction of total transactions verified if blocks up to
198
  //! the specified block hash are verified.
 
17
  #include <stdint.h>
18
  #include <string>
19
  #include <vector>
20
+ #include <map>
21
+ #include <set>
22
 
23
  class ArgsManager;
24
  class CBlock;
 
27
  class CRPCCommand;
28
  class CScheduler;
29
  class Coin;
30
+ class CScript;
31
+ class COutPoint;
32
  class uint256;
33
  enum class MemPoolRemovalReason;
34
  enum class RBFTransactionState;
 
42
 
43
  namespace interfaces {
44
 
45
+ //! Result of a shared UTXO-set script scan.
46
+ enum class ScanResult {
47
+ SUCCESS,
48
+ BUSY,
49
+ ABORTED,
50
+ UNAVAILABLE,
51
+ };
52
+
53
  class Handler;
54
  class Wallet;
55
 
 
205
  //! the current chain UTXO set. Iterates through all the keys in the map and
206
  //! populates the values.
207
  virtual void findCoins(std::map<COutPoint, Coin>& coins) = 0;
208
+ //! Snapshot scan for script matches. Results can become spent before use.
209
+ virtual ScanResult findScriptPubKeys(const std::set<CScript>& needles, std::map<COutPoint, Coin>& coins) = 0;
210
 
211
  //! Estimate fraction of total transactions verified if blocks up to
212
  //! the specified block hash are verified.