aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet-hd.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-06-09 16:35:17 -0400
committerJohn Newbery <john@johnnewbery.com>2017-09-01 12:25:54 -0400
commit36b626867087e9fae6d85f926248997ebff327b7 (patch)
treeecf522bb82c52e8c9c58bcd7839d550e71684ca4 /test/functional/wallet-hd.py
parentbe2a2ab6a67beef97e3c3cf42bd5eeea6c4e55cf (diff)
downloadbitcoin-36b626867087e9fae6d85f926248997ebff327b7.tar.xz
[tests] TestNode: separate add_node from start_node
Separates the act of creating a TestNode object from starting the node. The test_framework now keeps track of its list of TestNodes, and test writers can call start_node() and stop_node() without having to update the self.nodes list.
Diffstat (limited to 'test/functional/wallet-hd.py')
-rwxr-xr-xtest/functional/wallet-hd.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/wallet-hd.py b/test/functional/wallet-hd.py
index 751512301e..edc74089ba 100755
--- a/test/functional/wallet-hd.py
+++ b/test/functional/wallet-hd.py
@@ -25,8 +25,8 @@ class WalletHDTest(BitcoinTestFramework):
# Make sure can't switch off usehd after wallet creation
self.stop_node(1)
- self.assert_start_raises_init_error(1, self.options.tmpdir, ['-usehd=0'], 'already existing HD wallet')
- self.nodes[1] = self.start_node(1, self.options.tmpdir, self.extra_args[1])
+ self.assert_start_raises_init_error(1, ['-usehd=0'], 'already existing HD wallet')
+ self.start_node(1)
connect_nodes_bi(self.nodes, 0, 1)
# Make sure we use hd, keep masterkeyid
@@ -76,7 +76,7 @@ class WalletHDTest(BitcoinTestFramework):
shutil.rmtree(tmpdir + "/node1/regtest/blocks")
shutil.rmtree(tmpdir + "/node1/regtest/chainstate")
shutil.copyfile(tmpdir + "/hd.bak", tmpdir + "/node1/regtest/wallet.dat")
- self.nodes[1] = self.start_node(1, self.options.tmpdir, self.extra_args[1])
+ self.start_node(1)
# Assert that derivation is deterministic
hd_add_2 = None
@@ -91,7 +91,7 @@ class WalletHDTest(BitcoinTestFramework):
# Needs rescan
self.stop_node(1)
- self.nodes[1] = self.start_node(1, self.options.tmpdir, self.extra_args[1] + ['-rescan'])
+ self.start_node(1, extra_args=self.extra_args[1] + ['-rescan'])
assert_equal(self.nodes[1].getbalance(), num_hd_adds + 1)
# send a tx and make sure its using the internal chain for the changeoutput