Merge bitcoin/bitcoin#37011: test: fix input check of bumped tx in wallet_spend_unconfirmed.py
What changed, and why it matters
This is a one-line fix in a Bitcoin Core functional test file. The test was accidentally checking the wrong transaction after a fee-bump operation—it re-checked the original transaction instead of the new bumped transaction. This does not change any production wallet or node behavior; it only makes the test verify what it actually intended to verify.
No security action required. Treat as a normal test-quality improvement.
Security signals we found
No production code changed
Test-only assertion correction
No cryptographic, consensus, P2P, or wallet runtime logic modified
Evidence from the diff
In test/functional/wallet_spend_unconfirmed.py, the test_rbf_bumping subtest calls bumpfee() to create an RBF replacement, then calls assert_spends_only_parents() to confirm the replacement still spends only from the unconfirmed parent. Due to a copy-paste error, it passed the pre-bump transaction object (ancestor_aware_tx) instead of the post-bump object (bumped_ancestor_aware_tx). The patch changes the argument to bumped_ancestor_aware_tx. This is purely a test-code correctness fix.
Changed components
test/functional/wallet_spend_unconfirmed.pyInspect captured patch +1 / −1
### test/functional/wallet_spend_unconfirmed.py
@@ -324,7 +324,7 @@ def test_rbf_bumping(self):
bumped_ancestor_aware_txid = wallet.bumpfee(txid=to_be_rbfed_ancestor_aware_txid, options={"fee_rate": self.target_fee_rate * 2} )["txid"]
bumped_ancestor_aware_tx = wallet.gettransaction(txid=bumped_ancestor_aware_txid, verbose=True)
- self.assert_spends_only_parents(ancestor_aware_tx, [parent_txid])
+ self.assert_spends_only_parents(bumped_ancestor_aware_tx, [parent_txid])
resulting_bumped_fee_rate = self.calc_fee_rate(bumped_ancestor_aware_tx)
assert_greater_than_or_equal(resulting_bumped_fee_rate, 2*self.target_fee_rate)Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.