diff --git a/test/functional/wallet_upgrade.py b/test/functional/wallet_upgrade.py index 56da7680f5d24..ea995034b1057 100755 --- a/test/functional/wallet_upgrade.py +++ b/test/functional/wallet_upgrade.py @@ -76,7 +76,7 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 - def check_keys(self, addrs): + def check_keys(self, addrs, mined_blocks = 0): 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: @@ -87,7 +87,7 @@ def check_keys(self, addrs): 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): + for _ in range(0, 60 + mined_blocks): self.nodes[0].getnewaddress() self.log.info("All pre-upgrade keys should have been marked as used by now, creating new HD keys") @@ -143,7 +143,7 @@ def run_test(self): self.log.info("upgrade completed, checking keys now..") # Now check if the upgrade went fine - self.check_keys(addrs) + self.check_keys(addrs, 1) self.log.info("Upgrade via RPC completed, all good :)")