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. The two line-number columns refer to before and after.
src/interfaces/chain.h
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
#include <optional>
|
|
19
19
|
#include <string>
|
|
20
20
|
#include <vector>
|
|
21
|
+
#include <map>
|
|
22
|
+
#include <set>
|
|
21
23
|
|
|
22
24
|
class ArgsManager;
|
|
23
25
|
class CBlock;
|
|
@@ -26,6 +28,8 @@ class CFeeRate;
|
|
|
26
28
|
class CRPCCommand;
|
|
27
29
|
class CScheduler;
|
|
28
30
|
class Coin;
|
|
31
|
+
class CScript;
|
|
32
|
+
class COutPoint;
|
|
29
33
|
class uint256;
|
|
30
34
|
enum class MemPoolRemovalReason;
|
|
31
35
|
enum class RBFTransactionState;
|
|
@@ -39,6 +43,14 @@ struct NodeContext;
|
|
|
39
43
|
|
|
40
44
|
namespace interfaces {
|
|
41
45
|
|
|
46
|
+
//! Result of a shared UTXO-set script scan.
|
|
47
|
+
enum class ScanResult {
|
|
48
|
+
SUCCESS,
|
|
49
|
+
BUSY,
|
|
50
|
+
ABORTED,
|
|
51
|
+
UNAVAILABLE,
|
|
52
|
+
};
|
|
53
|
+
|
|
42
54
|
class Handler;
|
|
43
55
|
class Wallet;
|
|
44
56
|
|
|
@@ -187,6 +199,8 @@ public:
|
|
|
187
199
|
//! the current chain UTXO set. Iterates through all the keys in the map and
|
|
188
200
|
//! populates the values.
|
|
189
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;
|
|
190
204
|
|
|
191
205
|
//! Estimate fraction of total transactions verified if blocks up to
|
|
192
206
|
//! the specified block hash are verified.
|