v30.3-roots.1 · Commit 4: [PATCH 04/68] fix(wallet): preserve Roots database hardening on Core 30.3
test/functional/wallet_multiwallet.py
Before: test/functional/wallet_multiwallet.py · After: test/functional/wallet_multiwallet.py
File metadata
index 64f57cecf66113ad500a22b7ddd5f7347cac24a7..d79df4409e42efe279f0ba1402d223c4a9378030 100755
Download original patch · Release notes
Diff rows 1–15 of 15. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
test/functional/wallet_multiwallet.py
CHANGED
|
@@ -202,6 +202,15 @@ class MultiWalletTest(BitcoinTestFramework):
|
|
|
202
202
|
w5 = wallet("w5")
|
|
203
203
|
assert_equal(w5.getbalances()["mine"]["immature"], 50)
|
|
204
204
|
|
|
205
|
+
self.log.info("Verify wallet discovery does not descend into node databases")
|
|
206
|
+
hidden_wallet_dir = data_dir('indexes', 'wallet_discovery_fixture')
|
|
207
|
+
os.makedirs(hidden_wallet_dir)
|
|
208
|
+
w5.backupwallet(os.path.join(hidden_wallet_dir, 'wallet.dat'))
|
|
209
|
+
discovered = {w['name'] for w in node.listwalletdir()['wallets']}
|
|
210
|
+
assert 'w5' in discovered
|
|
211
|
+
assert 'indexes/wallet_discovery_fixture' not in discovered
|
|
212
|
+
shutil.rmtree(hidden_wallet_dir)
|
|
213
|
+
|
|
205
214
|
competing_wallet_dir = os.path.join(self.options.tmpdir, 'competing_walletdir')
|
|
206
215
|
os.mkdir(competing_wallet_dir)
|
|
207
216
|
self.restart_node(0, ['-nowallet', '-walletdir=' + competing_wallet_dir])
|