#34879 wallet, test: remove unnecessary node restart from wallet_reindex
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #34879 wallet, test: remove unnecessary node restart from wallet_reindex | Ready | 0 (+1) | Strong | 0 + 90 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Renames functional test `wallet_reindex.py` to `wallet_birthtime.py` and removes an unnecessary node restart. It clarifies the test's intent to focus on wallet birthtime updates during rescanning rather than reindexing, reduces the number of blocks generated, unloads the unused miner wallet early, and uses `bumpmocktime` instead of a custom time helper.
Problem: The test was misnamed and slower than necessary. Its primary assertion verifies that `rescanblockchain` updates wallet birthtime after importing a descriptor with a recent timestamp, making the full node restart redundant and block generation excessive.
Evidence of importance:
- PR description: 'This overhaul helps in reducing the time taken by the test from 2s to 0s as observed in few runs.'
Risk of a mistake: low (tests). A mistake would only cause functional test failures or mask a regression in wallet birthtime handling.
Changed since the previous assessment: No substantive changes to the approach or diff.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- reviewer: polespinasa to follow up on author's answers and comment updates 2026-10-26
Agreement
Strong
substantive support, no open objection (pablomartin4btc)
Thread notes: Author rkrux addressed polespinasa's inline review comments and objections regarding test coverage and comment clarity. All items are now answered.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| w0xlt (contributor) | question, approach | what is the motivation for the changes? | answered · author replied explaining it originated from PR #34857 and updated the PR description | answered | yes | 2026-03-22: 'what’s the motivation for those changes?' Status from: 2026-03-22: rkrux: 'As mentioned in the last line of the PR description, it started from the review of PR #34857 here' |
| polespinasa (member) | suggestion, maintenance | rephrase the comment to clarify that the test mines 20 blocks, one every 10 minutes, rather than 20 blocks every 10 minutes | answered · author agreed the comment was confusing and updated it | answered | yes | 2026-09-09: 'I find this comment really hard to read. The test is not mining 20blocks every 10min, it is mining 20 blocks, one every 10min.' Status from: 2026-10-26: rkrux: 'True, this comment could have come across as confusing. Updated.' |
| polespinasa (member) | objection, correctness | removing the restart drops test coverage of transaction confirmations and birthtime being preserved across restarts | answered · author explained test coverage is not lost because birthtime is updated and saved during rescan and preserved on reload without needing a node restart | answered | yes | 2026-09-09: 'By removing this restart we are loosing some test coverage, we now don't that tx confirmations and the birthtime are preserved over restart under reindex.' Status from: 2026-10-26: rkrux: 'I don't believe any test coverage is being lost here. The intent as per the original comments in this test file show that the correct update of wallet birthtime property needs to be tested' |
| polespinasa (member) | objection, maintenance | comment change inaccurately removes description of wallet as blank, when a wallet without private keys is blank by definition | answered · author replied that either is fine and used both | answered | yes | 2026-09-09: 'The wallet is in-fact a blank wallet, not `blank=True` does not mean that is not `blank`. As the wallet does not have private keys enabled, the wallet is at creation moment a blank wallet... I would ' Status from: 2026-10-26: rkrux: 'Either is fine, used both.' |
Support:
- pablomartin4btc (member) (Concept ACK, 2026-08-12) [read]: The goal is correct — the old "Reindex..." comment was misleading, the restart never used -reindex, and rescanblockchain is sufficient to test birthtime updates
- pablomartin4btc (member) (ACK, 2026-09-08): ACK 4996874b58b3f08b586eded89528fc5632fc909b Thanks for taking the suggestions. [not substantive]
Participants:
- w0xlt (contributor, question, 1 statements 2026-03-22 to 2026-03-22): asked about the motivation for the changes
- pablomartin4btc (member, support, 4 statements 2026-08-12 to 2026-09-09): Concept ACKed and ACKed the overhaul after suggestions were addressed
- polespinasa (member, objection, 6 statements 2026-09-09 to 2026-09-09): objected to removing the restart due to lost test coverage and suggested comment improvements
- sedited (member, neutral, 1 statements 2026-10-19 to 2026-10-19): pinged the author to follow up on polespinasa's review
Files
183 lines under test/bench/ci.
- test/functional/wallet_reindex.py +0/-92
- test/functional/wallet_birthtime.py +89/-0
- test/functional/test_runner.py +1/-1
Card
The short text the ranking pass compares across PRs.
Renames functional test wallet_reindex.py to wallet_birthtime.py and streamlines its execution. The test primarily validates wallet birthtime updates after rescanning, but previously performed an unnecessary node restart and mined redundant blocks. The refactor removes the restart, cuts block generation, unloads the miner wallet early, and replaces a custom mocktime helper. Author testing shows test runtime drops from 2s to sub-second. It has no dependencies.
Data
thread read through 2026-10-26 (20 statements), head 2459a744f3
labels: none
Categories
Wallet
P4 · cleanup
Clarifies test intent and removes a redundant node restart to reduce runtime by 2 seconds. The PR description notes this 'helps in reducing the time taken by the test from 2s to 0s' and clarifies rescan behavior rather than reindexing, making it a minor test cleanup with no functional impact on wallet code.
Membership: Refactors and renames the wallet functional test wallet_reindex.py to wallet_birthtime.py, which tests wallet birthtime updates during rescanning.
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0