v29.4-roots.3 · Commit 25: [PATCH 25/30] feat(wallet): expose advanced coin control facts
src/interfaces/wallet.h
Before: src/interfaces/wallet.h · After: src/interfaces/wallet.h
File metadata
index 1cdff039b357ca45ec2fe0649f9b07e25ccb20e6..491aa530362aa8f43762af0446350e25623e6343 100644
Download original patch · Release notes
Diff rows 1–50 of 50. 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/wallet.h
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
#include <common/signmessage.h>
|
|
10
10
|
#include <consensus/amount.h>
|
|
11
11
|
#include <interfaces/chain.h>
|
|
12
|
+
#include <policy/feerate.h>
|
|
12
13
|
#include <pubkey.h>
|
|
13
14
|
#include <script/script.h>
|
|
14
15
|
#include <support/allocators/secure.h>
|
|
@@ -26,7 +27,6 @@
|
|
|
26
27
|
#include <utility>
|
|
27
28
|
#include <vector>
|
|
28
29
|
|
|
29
|
-
class CFeeRate;
|
|
30
30
|
class CKey;
|
|
31
31
|
enum class FeeReason;
|
|
32
32
|
enum class OutputType;
|
|
@@ -261,7 +261,8 @@ public:
|
|
|
261
261
|
virtual CoinsList listCoins() = 0;
|
|
262
262
|
|
|
263
263
|
//! Return wallet transaction output information.
|
|
264
|
-
virtual std::vector<WalletTxOut> getCoins(const std::vector<COutPoint>& outputs) = 0;
|
|
264
|
+
virtual std::vector<WalletTxOut> getCoins(const std::vector<COutPoint>& outputs,
|
|
265
|
+
const std::optional<CFeeRate>& feerate = std::nullopt) = 0;
|
|
265
266
|
|
|
266
267
|
//! Get required fee.
|
|
267
268
|
virtual CAmount getRequiredFee(unsigned int tx_bytes) = 0;
|
|
@@ -451,10 +452,27 @@ struct WalletTxStatus
|
|
|
451
452
|
//! Wallet transaction output.
|
|
452
453
|
struct WalletTxOut
|
|
453
454
|
{
|
|
455
|
+
//! Outpoint identifying this output in the wallet.
|
|
456
|
+
COutPoint outpoint;
|
|
454
457
|
CTxOut txout;
|
|
458
|
+
//! Wallet's smart transaction time for this output.
|
|
455
459
|
int64_t time;
|
|
456
460
|
int depth_in_main_chain = -1;
|
|
457
461
|
bool is_spent = false;
|
|
462
|
+
//! Wallet-owned facts used to present coin-control choices.
|
|
463
|
+
int input_bytes = -1;
|
|
464
|
+
std::optional<CAmount> effective_value;
|
|
465
|
+
CAmount ancestor_bump_fees{0};
|
|
466
|
+
bool is_spendable = false;
|
|
467
|
+
bool is_solvable = false;
|
|
468
|
+
bool is_safe = false;
|
|
469
|
+
bool is_locked = false;
|
|
470
|
+
bool is_reused = false;
|
|
471
|
+
bool is_immature = false;
|
|
472
|
+
bool is_change = false;
|
|
473
|
+
CTxDestination address;
|
|
474
|
+
CTxDestination grouping_address;
|
|
475
|
+
std::string label;
|
|
458
476
|
};
|
|
459
477
|
|
|
460
478
|
//! Migrated wallet info
|