test: wallet: Warning for excessive fallback fee.
What changed, and why it matters
This commit only adds a new test case to Bitcoin Core's functional test suite. It checks that when a user starts the software with an unusually high fallback transaction fee, the software still works but prints a warning message. There is no code change to the actual Bitcoin Core wallet or fee logic—only a test that verifies existing behavior.
No security action needed. This is a test-only change. Reviewers may optionally confirm the warning behavior it tests is already present in the production codebase.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds nine lines to test/functional/wallet_fallbackfee.py. The new test starts a node with a fallback fee slightly above HIGH_TX_FEE_PER_KB, confirms sending still succeeds, and asserts that stopping the node produces an expected stderr warning about the high fallback fee. No production code is modified.
Changed components
test/functional/wallet_fallbackfee.pyInspect captured patch +9 / −0
diff --git a/test/functional/wallet_fallbackfee.py b/test/functional/wallet_fallbackfee.py
index b2a76b85..23fa5b68 100755
--- a/test/functional/wallet_fallbackfee.py
+++ b/test/functional/wallet_fallbackfee.py
@@ -61,6 +61,15 @@ class WalletFallbackFeeTest(BitcoinTestFramework):
self.sending_succeeds(node)
self.stop_node(0, expected_stderr='')
+ # Starting a node with a large fallback fee set...
+ excessive_fallback = HIGH_TX_FEE_PER_KB + Decimal('0.00000001')
+ self.start_node(0, extra_args=[f"-fallbackfee={excessive_fallback}"])
+ # ...works...
+ self.sending_succeeds(node)
+ # ...but results in a warning message.
+ expected_error = "Warning: -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available."
+ self.stop_node(0, expected_stderr=expected_error)
+
if __name__ == '__main__':
WalletFallbackFeeTest(__file__).main()
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.