Merge bitcoin/bitcoin#27471: test: fix bumpfee 'spend_one_input' occasional failure #1133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport Details
Bitcoin Commit: 54e07a0
Bitcoin PR: bitcoin#27471
Version: 0.25
Batch: 412
Summary
This backport introduces the
wallet_bumpfee.pyfunctional test file from Bitcoin Core, including the fix for the 'spend_one_input' occasional failure.Note: This PR adds the entire wallet_bumpfee.py test file (706 lines) because it doesn't exist yet in the batch branch. The Bitcoin commit 54e07a0 only modified 11 lines to fix a test ordering issue, but since the base file didn't exist, the cherry-pick brought in the complete file as it existed at that Bitcoin commit (with the fix already applied).
Changes
test/functional/wallet_bumpfee.pywith the fix already appliedtest_feerate_checks_replaced_outputsto the end of the test suite to prevent it from consuming UTXOs needed by other subtestsDependencies
This test requires the bumpfee RPC functionality to be backported first. The test will not work until those RPC commands are available in Dash Core.
Original Bitcoin Description
Most of the subtests in wallet_bumpfee.py expect to find spendable UTXOs of 0.001 btc in the rbf wallet. They use the 'spend_one_input()' method which fails if none of them exist.
The sporadic failure comes from the recently added 'test_feerate_checks_replaced_outputs' subtest that can spend all them, leaving the next subtests with no 0.001 UTXOs to spend.
To solve it, this PR moves the recently added case into a "context independent subtests" section which is placed at the end to not affect other cases.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com