Skip to content

Commit

Permalink
fix wallet_upgrade.py test, wasn't counting the coinbase script.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Feb 24, 2021
1 parent e6770c8 commit de3c7ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/functional/wallet_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1

def check_keys(self, addrs, mined_blocks = 0):
def check_keys(self, addrs):
self.log.info("Checking old keys existence in the upgraded wallet..")
# Now check that all of the pre upgrade addresses are still in the wallet
for addr in addrs:
Expand All @@ -87,7 +87,7 @@ def check_keys(self, addrs, mined_blocks = 0):
self.log.info("All pre-upgrade keys found in the wallet :)")

# Use all of the keys in the pre-HD keypool
for _ in range(0, 60 + mined_blocks):
for _ in range(0, 60):
self.nodes[0].getnewaddress()

self.log.info("All pre-upgrade keys should have been marked as used by now, creating new HD keys")
Expand Down Expand Up @@ -135,15 +135,15 @@ def run_test(self):
copyPreHDWallet(self.options.tmpdir, False)
self.start_node(0)

# Generating a block to not be in IBD
# Generating a block to not be in IBD, here we create a new key for the coinbase script
self.nodes[0].generate(1)

self.log.info("Upgrading wallet..")
self.nodes[0].upgradewallet()

self.log.info("upgrade completed, checking keys now..")
# Now check if the upgrade went fine
self.check_keys(addrs, 1)
self.check_keys(addrs)

self.log.info("Upgrade via RPC completed, all good :)")

Expand Down

0 comments on commit de3c7ae

Please sign in to comment.