v29.4-roots.3 · Commit 23: [PATCH 23/30] 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. The two line-number columns refer to before and after.
src/interfaces/chain.h
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
#include <stdint.h>
|
|
18
18
|
#include <string>
|
|
19
19
|
#include <vector>
|
|
20
|
+
#include <map>
|
|
21
|
+
#include <set>
|
|
20
22
|
|
|
21
23
|
class ArgsManager;
|
|
22
24
|
class CBlock;
|
|
@@ -25,6 +27,8 @@ class CFeeRate;
|
|
|
25
27
|
class CRPCCommand;
|
|
26
28
|
class CScheduler;
|
|
27
29
|
class Coin;
|
|
30
|
+
class CScript;
|
|
31
|
+
class COutPoint;
|
|
28
32
|
class uint256;
|
|
29
33
|
enum class MemPoolRemovalReason;
|
|
30
34
|
enum class RBFTransactionState;
|
|
@@ -38,6 +42,14 @@ struct NodeContext;
|
|
|
38
42
|
|
|
39
43
|
namespace interfaces {
|
|
40
44
|
|
|
45
|
+
//! Result of a shared UTXO-set script scan.
|
|
46
|
+
enum class ScanResult {
|
|
47
|
+
SUCCESS,
|
|
48
|
+
BUSY,
|
|
49
|
+
ABORTED,
|
|
50
|
+
UNAVAILABLE,
|
|
51
|
+
};
|
|
52
|
+
|
|
41
53
|
class Handler;
|
|
42
54
|
class Wallet;
|
|
43
55
|
|
|
@@ -193,6 +205,8 @@ public:
|
|
|
193
205
|
//! the current chain UTXO set. Iterates through all the keys in the map and
|
|
194
206
|
//! populates the values.
|
|
195
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;
|
|
196
210
|
|
|
197
211
|
//! Estimate fraction of total transactions verified if blocks up to
|
|
198
212
|
//! the specified block hash are verified.
|