test: refresh MiniWallet after node restart
What changed, and why it matters
This is a one-line fix inside a Bitcoin Core functional test. After restarting a test node, the test wallet's view of available coins is refreshed so the rest of the test can spend them correctly. It does not change production wallet, node, or consensus code, and has no security relevance for real users.
No action required; this is a test-only correctness improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In test/functional/interface_ipc_mining.py, after restart_node(0, …) the test now calls self.miniwallet.rescan_utxos(). The MiniWallet object caches UTXOs in memory; a node restart can invalidate that cache, so the refresh prevents subsequent test steps from trying to spend stale/non-existent UTXOs. The change is purely test infrastructure.
Changed components
test/functional/interface_ipc_mining.pyInspect captured patch +1 / −0
diff --git a/test/functional/interface_ipc_mining.py b/test/functional/interface_ipc_mining.py
index 5d081a8d..1288a454 100755
--- a/test/functional/interface_ipc_mining.py
+++ b/test/functional/interface_ipc_mining.py
@@ -324,6 +324,7 @@ class IPCMiningTest(BitcoinTestFramework):
# blockReservedWeight per template request and are unaffected; later in
# the test the IPC template includes a mempool transaction.
self.restart_node(0, extra_args=[f"-blockreservedweight={MAX_BLOCK_WEIGHT}"])
+ self.miniwallet.rescan_utxos()
async def async_routine():
ctx, mining = await make_mining_ctx(self)
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.