You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: Test migration cleans up bad inactive chain derivation path
A bug in 0.21.x and 22.x resulted in some wallets having invalid
derivation paths that are the concatenation of two derivation paths.
These appear only when inactive hd chains are topped up.
Since key metadata is a legacy wallet only record, migrating legacy
wallets to descriptor wallets will fix this issue as all key metadata
records are deleted. The derivation path information is derived
on-the-fly from the descriptor that is produced for the inactive hd
chain.
Thus we only need a test to verify that the derivation paths are good,
and that all key metadata records are deleted from the migrated wallet.
# Retrieve all records that have the "keymeta" prefix. The remaining key data varies for each record.
162
+
keymeta_rec=conn.execute("SELECT value FROM main where key >= x'076b65796d657461' AND key < x'076b65796d657462'").fetchone()
163
+
assert_equal(keymeta_rec, None)
164
+
conn.close()
165
+
exceptImportError:
166
+
self.log.warning("sqlite3 module not available, skipping lack of keymeta records check")
167
+
88
168
defrun_test(self):
89
169
node_miner=self.nodes[0]
90
170
node_master=self.nodes[1]
@@ -308,5 +388,7 @@ def run_test(self):
308
388
# Legacy wallets are no longer supported. Trying to load these should result in an error
309
389
assert_raises_rpc_error(-18, "The wallet appears to be a Legacy wallet, please use the wallet migration tool (migratewallet RPC)", node_master.restorewallet, wallet_name, backup_path)
0 commit comments