mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
stop_node(s) -> self.stop_node(s) in dash specific tests
Signed-off-by: Pasta <pasta@dashboost.org>
This commit is contained in:
parent
46dd6a3575
commit
3c96b25262
@ -45,7 +45,7 @@ class DIP3Test(BitcoinTestFramework):
|
|||||||
|
|
||||||
def stop_controller_node(self):
|
def stop_controller_node(self):
|
||||||
self.log.info("stopping controller node")
|
self.log.info("stopping controller node")
|
||||||
stop_node(self.nodes[0], 0)
|
self.stop_node(self.nodes[0], 0)
|
||||||
|
|
||||||
def restart_controller_node(self):
|
def restart_controller_node(self):
|
||||||
self.stop_controller_node()
|
self.stop_controller_node()
|
||||||
|
@ -439,9 +439,9 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||||||
# locked wallet test
|
# locked wallet test
|
||||||
self.nodes[1].encryptwallet("test")
|
self.nodes[1].encryptwallet("test")
|
||||||
self.nodes.pop(1)
|
self.nodes.pop(1)
|
||||||
stop_node(self.nodes[0], 0)
|
self.stop_node(self.nodes[0], 0)
|
||||||
stop_node(self.nodes[1], 2)
|
self.stop_node(self.nodes[1], 2)
|
||||||
stop_node(self.nodes[2], 3)
|
self.stop_node(self.nodes[2], 3)
|
||||||
|
|
||||||
self.nodes = start_nodes(4, self.options.tmpdir, [['-usehd=1']] * self.num_nodes, stderr=sys.stdout)
|
self.nodes = start_nodes(4, self.options.tmpdir, [['-usehd=1']] * self.num_nodes, stderr=sys.stdout)
|
||||||
# This test is not meant to test fee estimation and we'd like
|
# This test is not meant to test fee estimation and we'd like
|
||||||
|
@ -71,7 +71,7 @@ class LLMQChainLocksTest(DashTestFramework):
|
|||||||
# Keep node connected and let it try to reorg the chain
|
# Keep node connected and let it try to reorg the chain
|
||||||
good_tip = self.nodes[0].getbestblockhash()
|
good_tip = self.nodes[0].getbestblockhash()
|
||||||
# Restart it so that it forgets all the chainlocks from the past
|
# Restart it so that it forgets all the chainlocks from the past
|
||||||
stop_node(self.nodes[0], 0)
|
self.stop_node(self.nodes[0], 0)
|
||||||
self.nodes[0] = start_node(0, self.options.tmpdir, self.extra_args)
|
self.nodes[0] = start_node(0, self.options.tmpdir, self.extra_args)
|
||||||
connect_nodes(self.nodes[0], 1)
|
connect_nodes(self.nodes[0], 1)
|
||||||
self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
|
self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
|
||||||
|
@ -57,8 +57,8 @@ class SporkTest(BitcoinTestFramework):
|
|||||||
assert(sent)
|
assert(sent)
|
||||||
|
|
||||||
# restart nodes to check spork persistence
|
# restart nodes to check spork persistence
|
||||||
stop_node(self.nodes[0], 0)
|
self.stop_node(self.nodes[0], 0)
|
||||||
stop_node(self.nodes[1], 1)
|
self.stop_node(self.nodes[1], 1)
|
||||||
self.nodes[0] = start_node(0, self.options.tmpdir)
|
self.nodes[0] = start_node(0, self.options.tmpdir)
|
||||||
self.nodes[1] = start_node(1, self.options.tmpdir)
|
self.nodes[1] = start_node(1, self.options.tmpdir)
|
||||||
assert(not self.get_test_spork_state(self.nodes[0]))
|
assert(not self.get_test_spork_state(self.nodes[0]))
|
||||||
|
@ -458,7 +458,7 @@ class DashTestFramework(BitcoinTestFramework):
|
|||||||
|
|
||||||
def prepare_datadirs(self):
|
def prepare_datadirs(self):
|
||||||
# stop faucet node so that we can copy the datadir
|
# stop faucet node so that we can copy the datadir
|
||||||
stop_node(self.nodes[0], 0)
|
self.stop_node(self.nodes[0], 0)
|
||||||
|
|
||||||
start_idx = len(self.nodes)
|
start_idx = len(self.nodes)
|
||||||
for idx in range(0, self.mn_count):
|
for idx in range(0, self.mn_count):
|
||||||
|
@ -68,7 +68,7 @@ class WalletHDTest(BitcoinTestFramework):
|
|||||||
assert_equal(self.nodes[1].getbalance(), num_hd_adds + 1)
|
assert_equal(self.nodes[1].getbalance(), num_hd_adds + 1)
|
||||||
|
|
||||||
self.log.info("Restore backup ...")
|
self.log.info("Restore backup ...")
|
||||||
stop_node(self.nodes[1],1)
|
self.stop_node(self.nodes[1],1)
|
||||||
os.remove(self.options.tmpdir + "/node1/regtest/wallet.dat")
|
os.remove(self.options.tmpdir + "/node1/regtest/wallet.dat")
|
||||||
shutil.copyfile(tmpdir + "/hd.bak", tmpdir + "/node1/regtest/wallet.dat")
|
shutil.copyfile(tmpdir + "/hd.bak", tmpdir + "/node1/regtest/wallet.dat")
|
||||||
self.nodes[1] = self.start_node(1, self.options.tmpdir, self.extra_args[1], stderr=sys.stdout)
|
self.nodes[1] = self.start_node(1, self.options.tmpdir, self.extra_args[1], stderr=sys.stdout)
|
||||||
|
Loading…
Reference in New Issue
Block a user