Merge bitcoin/bitcoin#36378: test: Add SKIP_WRITE edge case to wallet_startup
What changed, and why it matters
This commit only adds a new test case to Bitcoin Core's functional test suite. It checks that reloading a wallet already marked to start automatically does not trigger an unnecessary settings write or warning when settings are disabled. There is no change to production code, no bug fix, and no security-relevant behavior change.
No action required. This is a test-only change with no security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds three lines to test/functional/wallet_startup.py: it unloads and reloads a wallet with load_on_startup=True, asserting the wallet reloads without warnings. This exercises the SKIP_WRITE path in the dynamic settings logic introduced in PR #36176. No C++ or wallet logic is modified.
Changed components
test/functional/wallet_startup.pyInspect captured patch +5 / −0
### test/functional/wallet_startup.py
@@ -82,6 +82,11 @@ def test_disabled_settings(self, node):
assert_equal(node.loadwallet(filename="no_settings"), {"name": "no_settings"})
assert_equal(node.get_wallet_rpc("no_settings").getwalletinfo()["walletname"], "no_settings")
+ # Re-adding a wallet already in the startup list skips the write, so it does not warn either.
+ assert_equal(node.unloadwallet(wallet_name="no_settings"), {})
+ assert_equal(node.loadwallet(filename="no_settings", load_on_startup=True), {"name": "no_settings"})
+ assert_equal(node.get_wallet_rpc("no_settings").getwalletinfo()["walletname"], "no_settings")
+
assert_equal(node.loadwallet(filename="w2", load_on_startup=True), {"name": "w2", "warnings": [load_message]})
assert_equal(set(node.listwallets()), {'', 'no_settings', 'w2'})
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.