Skip to content

Commit 730e14a

Browse files
committed
test: wallet: check that labels are migrated to watchonly wallet
1 parent d5f4ae7 commit 730e14a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/functional/wallet_migration.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def test_other_watchonly(self):
258258
self.log.info("Test migration of a wallet with watchonly imports")
259259
imports0 = self.create_legacy_wallet("imports0")
260260

261-
# Exteranl address label
261+
# External address label
262262
imports0.setlabel(default.getnewaddress(), "external")
263263

264264
# Normal non-watchonly tx
@@ -311,6 +311,13 @@ def test_other_watchonly(self):
311311
assert_raises_rpc_error(-5, "Invalid or non-wallet transaction id", watchonly.gettransaction, received_txid)
312312
assert_equal(len(watchonly.listtransactions(include_watchonly=True)), 3)
313313

314+
# Check that labels were migrated and persisted to watchonly wallet
315+
self.nodes[0].unloadwallet("imports0_watchonly")
316+
self.nodes[0].loadwallet("imports0_watchonly")
317+
labels = watchonly.listlabels()
318+
assert "external" in labels
319+
assert "imported" in labels
320+
314321
def test_no_privkeys(self):
315322
default = self.nodes[0].get_wallet_rpc(self.default_wallet_name)
316323

0 commit comments

Comments
 (0)