Skip to content

Commit

Permalink
test: wallet: check that labels are migrated to watchonly wallet
Browse files Browse the repository at this point in the history
Github-Pull: #26761
Rebased-From: 730e14a
  • Loading branch information
theStack authored and fanquake committed Feb 20, 2023
1 parent 342abfb commit cbcdafa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/functional/wallet_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_other_watchonly(self):
imports0 = self.nodes[0].get_wallet_rpc("imports0")
assert_equal(imports0.getwalletinfo()["descriptors"], False)

# Exteranl address label
# External address label
imports0.setlabel(default.getnewaddress(), "external")

# Normal non-watchonly tx
Expand Down Expand Up @@ -310,6 +310,13 @@ def test_other_watchonly(self):
assert_raises_rpc_error(-5, "Invalid or non-wallet transaction id", watchonly.gettransaction, received_txid)
assert_equal(len(watchonly.listtransactions(include_watchonly=True)), 3)

# Check that labels were migrated and persisted to watchonly wallet
self.nodes[0].unloadwallet("imports0_watchonly")
self.nodes[0].loadwallet("imports0_watchonly")
labels = watchonly.listlabels()
assert "external" in labels
assert "imported" in labels

def test_no_privkeys(self):
default = self.nodes[0].get_wallet_rpc(self.default_wallet_name)

Expand Down

0 comments on commit cbcdafa

Please sign in to comment.