v29.4-roots.4 · Commit 23: [PATCH 23/37] feat(wallet): add transient private-key sweep RPC
src/wallet/spend.h
Before: src/wallet/spend.h · After: src/wallet/spend.h
File metadata
index ac5a080cac7d8c4a0b5662b8f3d509f7252e8526..b6ba26454dbdcfca9ec00cd8bf719a3241f4089a 100644
Download original patch · Release notes
Diff rows 1–28 of 28. 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
|
@@ -13,10 +13,28 @@
|
|
| 13 |
#include <wallet/wallet.h>
|
| 14 |
|
| 15 |
#include <optional>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
class FastRandomContext;
|
| 18 |
|
| 19 |
namespace wallet {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
/** Pick an automatic anti-fee-sniping locktime that does not collide with reserved policy markers. */
|
| 21 |
uint32_t GetAntiFeeSnipingLockTime(int block_height, FastRandomContext& rng_fast);
|
| 22 |
|
|
|
|
| 13 |
#include <wallet/wallet.h>
|
| 14 |
|
| 15 |
#include <optional>
|
| 16 |
+
#include <functional>
|
| 17 |
+
#include <map>
|
| 18 |
+
|
| 19 |
+
class COutPoint;
|
| 20 |
+
class Coin;
|
| 21 |
+
class CScript;
|
| 22 |
+
struct FlatSigningProvider;
|
| 23 |
|
| 24 |
class FastRandomContext;
|
| 25 |
|
| 26 |
namespace wallet {
|
| 27 |
+
struct SweepTransactionResult
|
| 28 |
+
{
|
| 29 |
+
CTransactionRef tx;
|
| 30 |
+
CAmount amount;
|
| 31 |
+
CAmount fee;
|
| 32 |
+
};
|
| 33 |
+
|
| 34 |
+
using SweepBroadcastFn = std::function<bool(const CTransactionRef&, std::string&)>;
|
| 35 |
+
util::Result<SweepTransactionResult> CreateSweepTransaction(CWallet& wallet, FlatSigningProvider& provider,
|
| 36 |
+
const std::map<COutPoint, Coin>& coins,
|
| 37 |
+
const CScript& destination, const SweepBroadcastFn& broadcast);
|
| 38 |
/** Pick an automatic anti-fee-sniping locktime that does not collide with reserved policy markers. */
|
| 39 |
uint32_t GetAntiFeeSnipingLockTime(int block_height, FastRandomContext& rng_fast);
|
| 40 |
|