Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 28: [PATCH 28/68] fix(wallet): secure asynchronous sweep cancellation

src/wallet/spend.h

Before: src/wallet/spend.h · After: src/wallet/spend.h

File metadata
index 1939e9ce59267cb9a3a1e3228078d43d131b54e0..73501e31e406c6e1ef090d0517874824e8c1b0b7 100644

Download original patch · Release notes

Diff rows 1–19 of 19. 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/wallet/spend.h CHANGED
@@ -25,6 +25,10 @@ class Coin;
25
  class CScript;
26
  struct FlatSigningProvider;
27
 
 
 
 
 
28
  class FastRandomContext;
29
 
30
  namespace wallet {
@@ -38,7 +42,8 @@ struct SweepTransactionResult
38
  using SweepBroadcastFn = std::function<bool(const CTransactionRef&, std::string&)>;
39
  util::Result<SweepTransactionResult> CreateSweepTransaction(CWallet& wallet, FlatSigningProvider& provider,
40
  const std::map<COutPoint, Coin>& coins,
41
- const CScript& destination, const SweepBroadcastFn& broadcast);
 
42
  /** Pick an automatic anti-fee-sniping locktime that does not collide with reserved policy markers. */
43
  uint32_t GetAntiFeeSnipingLockTime(int block_height, FastRandomContext& rng_fast);
44
 
 
25
  class CScript;
26
  struct FlatSigningProvider;
27
 
28
+ namespace interfaces {
29
+ class SweepAuthorization;
30
+ }
31
+
32
  class FastRandomContext;
33
 
34
  namespace wallet {
 
42
  using SweepBroadcastFn = std::function<bool(const CTransactionRef&, std::string&)>;
43
  util::Result<SweepTransactionResult> CreateSweepTransaction(CWallet& wallet, FlatSigningProvider& provider,
44
  const std::map<COutPoint, Coin>& coins,
45
+ const CScript& destination, const SweepBroadcastFn& broadcast,
46
+ interfaces::SweepAuthorization& authorization);
47
  /** Pick an automatic anti-fee-sniping locktime that does not collide with reserved policy markers. */
48
  uint32_t GetAntiFeeSnipingLockTime(int block_height, FastRandomContext& rng_fast);
49