mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 10:42:13 +02:00
Merge bitcoin/bitcoin#26675: wallet: For feebump, ignore abandoned descendant spends
f9ce0eadf4For feebump, ignore abandoned descendant spends (John Moffett) Pull request description: Closes #26667 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. This behavior is currently [enforced](9e229a542f/src/wallet/feebumper.cpp (L25-L28)) and [tested](9e229a542f/test/functional/wallet_bumpfee.py (L270-L286)). However, this check shouldn't apply to spends in abandoned descendant transactions, as explained by #26667. `CWallet::IsSpent` already carves out an exception for abandoned transactions, so we can just use that. I've also added a new test to cover this case. ACKs for top commit: Sjors: re-utACKf9ce0eadf4achow101: ACKf9ce0eadf4furszy: ACKf9ce0eadTree-SHA512: 19d957d1cf6747668bb114e27a305027bfca5a9bed2b1d9cc9e1b0bd4666486c7c4b60b045a7fe677eb9734d746f5de76390781fb1e9e0bceb4a46d20acd1749
This commit is contained in:
@@ -647,8 +647,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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user