aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/spend.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-04-27 11:15:09 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-06-08 11:30:26 -0300
commitfd5c996d1609e6f88769f6f3ef0c322e3435b3aa (patch)
tree251fead3ab31d300ed6231be0160e0537d2a5ef1 /src/wallet/spend.h
parent162d4ad10f28c5fa38551d69ce9b296ab3933c77 (diff)
downloadbitcoin-fd5c996d1609e6f88769f6f3ef0c322e3435b3aa.tar.xz
wallet: GetAvailableBalance, remove double walk-through every available coin
Filtering `AvailableCoins` by spendable outputs only and using the retrieved total_amount.
Diffstat (limited to 'src/wallet/spend.h')
-rw-r--r--src/wallet/spend.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h
index 84628517b0..cba42d6fae 100644
--- a/src/wallet/spend.h
+++ b/src/wallet/spend.h
@@ -36,6 +36,8 @@ TxSize CalculateMaximumSignedTxSize(const CTransaction& tx, const CWallet* walle
struct CoinsResult {
std::vector<COutput> coins;
+ // Sum of all the coins amounts
+ CAmount total_amount{0};
};
/**
* Return vector of available COutputs.