-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport!: bitcoin#23123, #23147 (wallet rescan related, breaking changes) #7037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Notable changes | ||
| =============== | ||
|
|
||
| Rescan startup parameter removed | ||
| -------------------------------- | ||
|
|
||
| The `-rescan` startup parameter has been removed. Wallets which require | ||
| rescanning due to corruption will still be rescanned on startup. | ||
| Otherwise, please use the `rescanblockchain` RPC to trigger a rescan. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,6 @@ | |
| from test_framework.test_framework import DashTestFramework | ||
| from test_framework.util import ( | ||
| assert_equal, | ||
| force_finish_mnsync, | ||
| ) | ||
|
|
||
| # Linux allow all characters other than \x00 | ||
|
|
@@ -56,7 +55,6 @@ def setup_network(self): | |
| f"-shutdownnotify=echo > {self.shutdownnotify_file}", | ||
| f"-chainlocknotify=echo > {os.path.join(self.chainlocknotify_dir, '%s')}", | ||
| ], [ | ||
| "-rescan", | ||
| f"-walletnotify=echo %h_%b > {os.path.join(self.walletnotify_dir, notify_outputname('%w', '%s'))}", | ||
| f"-instantsendnotify=echo > {os.path.join(self.instantsendnotify_dir, notify_outputname('%w', '%s'))}", | ||
| ], | ||
|
|
@@ -89,17 +87,15 @@ def run_test(self): | |
|
|
||
| # directory content should equal the generated transaction hashes | ||
| tx_details = list(map(lambda t: (t['txid'], t['blockheight'], t['blockhash']), self.nodes[1].listtransactions("*", block_count))) | ||
| self.stop_node(1) | ||
| self.expect_wallet_notify(tx_details) | ||
|
|
||
| self.log.info("test -walletnotify after rescan") | ||
| # restart node to rescan to force wallet notifications | ||
| self.start_node(1) | ||
| force_finish_mnsync(self.nodes[1]) | ||
| self.connect_nodes(0, 1) | ||
|
|
||
| # rescan to force wallet notifications | ||
| self.nodes[1].rescanblockchain() | ||
| self.wait_until(lambda: len(os.listdir(self.walletnotify_dir)) == block_count, timeout=10) | ||
|
|
||
| self.connect_nodes(0, 1) | ||
|
knst marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💬 Nitpick: Stale connect_nodes(0, 1) after switch from startup -rescan to rescanblockchain() (carried forward) Verified at current head: the test replaces the prior stop/restart-with- source: ['claude', 'codex']
Comment on lines
92
to
+97
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Blocking: Carried forward: stale reconnect after replacing startup rescan with RPC rescan Carried forward from the previous review. bitcoin#23123 replaced the notification test's startup -rescan coverage with rescanblockchain(), and Dash made the same adaptation, but the test still calls self.connect_nodes(0, 1) even though node 1 is no longer stopped or restarted on this path. This is functionally harmless, but it is stale test adaptation from the removed startup-rescan flow and the test no longer covers startup-rescan notifications. Policy gate (backport-prereq-restore): For full upstream backport PRs, a missing prerequisite is blocking unless the finding is explicitly allowlisted (e.g. source: ['codex-backport-reviewer'] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved in this update — Carried forward: stale reconnect after replacing startup rescan with RPC rescan no longer present. Auto-resolved by the review system based on the latest commit diff. If you believe this was closed in error, reopen the thread. |
||
|
|
||
| # directory content should equal the generated transaction hashes | ||
| tx_details = list(map(lambda t: (t['txid'], t['blockheight'], t['blockhash']), self.nodes[1].listtransactions("*", block_count))) | ||
| self.expect_wallet_notify(tx_details) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the early return for non-
LOAD_OKresults was removed, any wallet load error now falls through to the CoinJoin salt initialization before this return. In the scenario whereWalletBatch::LoadWallet()returnsCORRUPT,TOO_NEW, orNEED_REWRITEand the wallet has no salt,SetCoinJoinSalt(GetRandHash())writes a new record to the same database even though the wallet is about to be rejected, so merely attempting to open a damaged or unsupported wallet can mutate it. Please only fall through for statuses that are meant to continue loading, or return before side effects for hard failures.Useful? React with 👍 / 👎.