AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge bitcoin/bitcoin#36863: test: fix wallet tests that check the wrong wallet

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36863: test: fix wallet tests that check the wrong wallet

13b2d21bebb0d84847e1c42f96db280058e7b0a6 test: check w8, not w7, after creating the avoid_reuse wallet (w0xlt)
215f8b828bc5c85b6a662c1424902e25c23ec6c0 test: restore each node's own wallet backup in wallet_keypool_topup (w0xlt)

Pull request description:

`wallet_keypool_topup.py` is meant to test keypool restore for four output types, one node each. But the wallet and backup paths are only set for node1, so for nodes 2-4 the test copies node1's backup over node1's running wallet and restarts the node under test on its own, never-restored wallet. The checks still pass, so only the legacy case has actually been tested since 0dcac51049.

This backs up and restores each node's own wallet, and asserts that the restored wallet rescans on startup so the test can't silently skip the restore again. Adding just that assertion on master makes the test fail at node2.

Also fixes `wallet_createwallet.py` calling `w7.walletpassphrase` where it means w8 (since c5d3787367), so the `avoid_reuse wallet` was never checked.

ACKs for top commit:
maflcko:
review ACK 13b2d21bebb0d84847e1c42f96db280058e7b0a6 🍵
fjahr:
Code review ACK 13b2d21bebb0d84847e1c42f96db280058e7b0a6

Tree-SHA512: 9e4b5b04da3b1d3a9255ecf3ccd7e8a0f2d550195a665cffbdf9865ab599ba2433feed7dcdc30bfccb5870c9a6d51a1e47b4ae2f3f798963b30db5e72508d9b8
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes two mistakes in Bitcoin Core's automated test scripts. In one test, the code was accidentally checking the wrong digital wallet (w7 instead of w8), so it never verified that a new 'avoid reuse' wallet worked correctly. In another test, the code was copying one node's wallet backup to all four nodes, meaning only the first node was actually being tested for keypool recovery. These are test-only bugs with no effect on the live Bitcoin Core software users run.

Recommended action

No security action required. Treat as ordinary test-quality improvement. Reviewers may want to confirm the revised tests pass in CI.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.