mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 02:31:05 +02:00
[tests] Remove is_network_split from funtional test cases
This commit is contained in:
@ -22,12 +22,7 @@ class WalletHDTest(BitcoinTestFramework):
|
||||
super().__init__()
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 2
|
||||
self.node_args = [['-usehd=0'], ['-usehd=1', '-keypool=0']]
|
||||
|
||||
def setup_network(self):
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.node_args)
|
||||
self.is_network_split = False
|
||||
connect_nodes_bi(self.nodes, 0, 1)
|
||||
self.extra_args = [['-usehd=0'], ['-usehd=1', '-keypool=0']]
|
||||
|
||||
def run_test (self):
|
||||
tmpdir = self.options.tmpdir
|
||||
@ -35,7 +30,7 @@ class WalletHDTest(BitcoinTestFramework):
|
||||
# Make sure can't switch off usehd after wallet creation
|
||||
self.stop_node(1)
|
||||
assert_start_raises_init_error(1, self.options.tmpdir, ['-usehd=0'], 'already existing HD wallet')
|
||||
self.nodes[1] = start_node(1, self.options.tmpdir, self.node_args[1])
|
||||
self.nodes[1] = start_node(1, self.options.tmpdir, self.extra_args[1])
|
||||
connect_nodes_bi(self.nodes, 0, 1)
|
||||
|
||||
# Make sure we use hd, keep masterkeyid
|
||||
@ -82,7 +77,7 @@ class WalletHDTest(BitcoinTestFramework):
|
||||
self.stop_node(1)
|
||||
os.remove(self.options.tmpdir + "/node1/regtest/wallet.dat")
|
||||
shutil.copyfile(tmpdir + "/hd.bak", tmpdir + "/node1/regtest/wallet.dat")
|
||||
self.nodes[1] = start_node(1, self.options.tmpdir, self.node_args[1])
|
||||
self.nodes[1] = start_node(1, self.options.tmpdir, self.extra_args[1])
|
||||
#connect_nodes_bi(self.nodes, 0, 1)
|
||||
|
||||
# Assert that derivation is deterministic
|
||||
@ -96,7 +91,7 @@ class WalletHDTest(BitcoinTestFramework):
|
||||
|
||||
# Needs rescan
|
||||
self.stop_node(1)
|
||||
self.nodes[1] = start_node(1, self.options.tmpdir, self.node_args[1] + ['-rescan'])
|
||||
self.nodes[1] = start_node(1, self.options.tmpdir, self.extra_args[1] + ['-rescan'])
|
||||
#connect_nodes_bi(self.nodes, 0, 1)
|
||||
assert_equal(self.nodes[1].getbalance(), num_hd_adds + 1)
|
||||
|
||||
|
Reference in New Issue
Block a user