diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-04-27 11:15:09 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-06-08 11:30:26 -0300 |
commit | fd5c996d1609e6f88769f6f3ef0c322e3435b3aa (patch) | |
tree | 251fead3ab31d300ed6231be0160e0537d2a5ef1 /src/wallet/spend.h | |
parent | 162d4ad10f28c5fa38551d69ce9b296ab3933c77 (diff) | |
download | bitcoin-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.h | 2 |
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. |