aboutsummaryrefslogtreecommitdiff
path: root/test/functional/keypool-topup.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/keypool-topup.py')
-rwxr-xr-xtest/functional/keypool-topup.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/functional/keypool-topup.py b/test/functional/keypool-topup.py
index 0e0c0ea74b..160a0f7ae5 100755
--- a/test/functional/keypool-topup.py
+++ b/test/functional/keypool-topup.py
@@ -20,11 +20,10 @@ from test_framework.util import (
)
class KeypoolRestoreTest(BitcoinTestFramework):
- def __init__(self):
- super().__init__()
+ def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
- self.extra_args = [['-usehd=0'], ['-usehd=1', '-keypool=100', '-keypoolmin=20']]
+ self.extra_args = [[], ['-keypool=100', '-keypoolmin=20']]
def run_test(self):
self.tmpdir = self.options.tmpdir
@@ -35,7 +34,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
self.stop_node(1)
shutil.copyfile(self.tmpdir + "/node1/regtest/wallet.dat", self.tmpdir + "/wallet.bak")
- self.nodes[1] = self.start_node(1, self.tmpdir, self.extra_args[1])
+ self.start_node(1, self.extra_args[1])
connect_nodes_bi(self.nodes, 0, 1)
self.log.info("Generate keys for wallet")
@@ -61,7 +60,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
self.log.info("Verify keypool is restored and balance is correct")
- self.nodes[1] = self.start_node(1, self.tmpdir, self.extra_args[1])
+ self.start_node(1, self.extra_args[1])
connect_nodes_bi(self.nodes, 0, 1)
self.sync_all()
@@ -69,7 +68,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
assert_equal(self.nodes[1].listtransactions()[0]['category'], "receive")
# Check that we have marked all keys up to the used keypool key as used
- assert_equal(self.nodes[1].validateaddress(self.nodes[1].getnewaddress())['hdkeypath'], "m/0'/0'/111'")
+ assert_equal(self.nodes[1].validateaddress(self.nodes[1].getnewaddress())['hdkeypath'], "m/0'/0'/110'")
if __name__ == '__main__':
KeypoolRestoreTest().main()