aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Moffett <john.moff@gmail.com>2022-12-09 13:31:27 -0500
committerfanquake <fanquake@gmail.com>2023-02-20 17:15:37 +0000
commit5c824ac5e1e35f77e323319849b03ac9d8cf45d3 (patch)
tree9b17534e7a68531df5e3b95657d0a3d17527aea5 /src
parent428dcd51e6adab564ffb87ed678317924868572f (diff)
For feebump, ignore abandoned descendant spends
To be eligible for fee-bumping, a transaction must not have any of its outputs (eg - change) spent in other unconfirmed transactions in the wallet. However, this check should not apply to abandoned transactions. A new test case is added to cover this case. Github-Pull: #26675 Rebased-From: f9ce0eadf4eb58d1e2207c27fabe69a5642482e7
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 2cab85ceea..9149152bb0 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -589,8 +589,7 @@ bool CWallet::HasWalletSpend(const CTransactionRef& tx) const
AssertLockHeld(cs_wallet);
const uint256& txid = tx->GetHash();
for (unsigned int i = 0; i < tx->vout.size(); ++i) {
- auto iter = mapTxSpends.find(COutPoint(txid, i));
- if (iter != mapTxSpends.end()) {
+ if (IsSpent(COutPoint(txid, i))) {
return true;
}
}