Add Integration Test for Sweeper Fee-Bumping to Maximum Fee Rate #9733
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.
Description
This PR adds
testBumpFeeUntilMaxReached
, an integration test to validate the LND sweeper’s fee-bumping for wallet transactions. It ensures the sweeper escalates fees to the configured maximum (--sweeper.maxfeerate=100
sat/vbyte), respects budgets, and handles errors like "max fee rate exceeded". The test supports optimizing sweeper fee functions (e.g., cubic delay, linear, cubic eager) per issue #8763.The test:
--sweeper.maxfeerate=100
, funds it with 1 BTC.BumpFee
RPC until 100 sat/vbyte, with a 50,000 sat budget.Results: Successfully reaches 100 sat/vbyte in ~3 bumps (1 → 10 → 50 → 100 sat/vbyte), passes all assertions.
Link to Associated Issue: Issue #8763 (adjust if needed).
Steps to Test
Clone and Checkout:
Set Up:
make
are installed.go mod tidy
.Run Test:
make clean && make itest icase=bump_fee_until_max_reached
Verify Output:
Test Edge Cases:
--sweeper.maxfeerate=50
initest/lnd_fee_bump_max.go
, rerun, verify 50 sat/vbyte limit.Budget: 1000
, confirm budget error.Review Code:
itest/lnd_fee_bump_max.go
anditest/list_on_test.go
.Pull Request Checklist
Testing
kvdb/v1.4.15-37-g51add8a70-dirty
).Code Style and Documentation
📝 See Contribution Guidelines for further guidance.