Merge bitcoin/bitcoin#36381: test: avoid testing at the exact `-maxfeerate` boundary
What changed, and why it matters
This commit fixes a flaky automated test in Bitcoin Core. The test was checking the maximum transaction fee rate by creating a transaction at the exact boundary, which sometimes failed because the real transaction size could be slightly smaller than estimated. The fix simply lowers the requested fee rate in the test so it no longer sits exactly on the boundary. There is no change to production code or to any real security behavior.
No security action required. Treat as a normal test reliability improvement.
Security signals we found
No production code changed
Test-only change
No memory safety, cryptography, consensus, or authorization changes
No input validation or parsing changes in runtime code
Evidence from the diff
The change is a one-line adjustment in test/functional/wallet_send.py. The test_maxfeerate functional test previously requested fee_rate=Decimal(‘1.009’) against -maxfeerate=0.00001009 (equivalent to 1.009 sat/vByte). Because the wallet estimates the maximum signed vsize when computing the fee, but the node enforces -maxfeerate against the actual signed vsize, a smaller-than-estimated signature can produce a higher effective feerate and trigger rejection. This caused intermittent CI failures. The patch changes the requested feerate to Decimal(‘1.000’), safely below the limit, while still exercising the maxfeerate code path. No consensus, P2P, mempool, wallet, or RPC production logic is modified.
Changed components
test/functional/wallet_send.pyInspect captured patch +1 / −1
### test/functional/wallet_send.py
@@ -222,7 +222,7 @@ def test_maxfeerate(self):
self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), amount=1, fee_rate=9)
self.restart_node(0, extra_args=['-maxfeerate=0.00001009'])
- self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), amount=1, fee_rate=Decimal("1.009"))
+ self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), amount=1, fee_rate=Decimal("1.000"))
def run_test(self):
self.log.info("Setup wallets...")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.