From 071035b93aa35518f1c0b45f51f3b9a505f4dbd0 Mon Sep 17 00:00:00 2001 From: Pasta Date: Fri, 25 Jan 2019 13:36:10 +0000 Subject: [PATCH] Apply code review suggestions #2647 --- qa/rpc-tests/bip68-sequence.py | 2 +- qa/rpc-tests/test_framework/util.py | 7 +++---- qa/rpc-tests/wallet-hd.py | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) mode change 100644 => 100755 qa/rpc-tests/wallet-hd.py diff --git a/qa/rpc-tests/bip68-sequence.py b/qa/rpc-tests/bip68-sequence.py index 4278d7c8e5..86c1622dce 100755 --- a/qa/rpc-tests/bip68-sequence.py +++ b/qa/rpc-tests/bip68-sequence.py @@ -50,7 +50,7 @@ class BIP68Test(BitcoinTestFramework): self.activateCSV() print("Verifying nVersion=2 transactions are standard.") - print("Note that with current versions of bitcoin software, nVersion=2 transactions are always standard (independent of BIP68 activation status).") + print("Note that with current versions of Dash Core software, nVersion=2 transactions are always standard (independent of BIP68 activation status).") self.test_version2_relay() print("Passed\n") diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index b76bd10636..8736bbc380 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -368,7 +368,6 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary= # Allow to redirect stderr to stdout in case we expect some non-critical warnings/errors printed to stderr # Otherwise the whole test would be considered to be failed in such cases - stderr = None if redirect_stderr: stderr = sys.stdout @@ -392,7 +391,7 @@ def assert_start_raises_init_error(i, dirname, extra_args=None, expected_msg=Non node = start_node(i, dirname, extra_args, stderr=log_stderr) stop_node(node, i) except Exception as e: - assert 'bitcoind exited' in str(e) #node must have shutdown + assert 'dashd exited' in str(e) #node must have shutdown if expected_msg is not None: log_stderr.seek(0) stderr = log_stderr.read().decode('utf-8') @@ -400,9 +399,9 @@ def assert_start_raises_init_error(i, dirname, extra_args=None, expected_msg=Non raise AssertionError("Expected error \"" + expected_msg + "\" not found in:\n" + stderr) else: if expected_msg is None: - assert_msg = "bitcoind should have exited with an error" + assert_msg = "dashd should have exited with an error" else: - assert_msg = "bitcoind should have exited with expected error " + expected_msg + assert_msg = "dashd should have exited with expected error " + expected_msg raise AssertionError(assert_msg) def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, timewait=None, binary=None, redirect_stderr=False): diff --git a/qa/rpc-tests/wallet-hd.py b/qa/rpc-tests/wallet-hd.py old mode 100644 new mode 100755 index 935ad9e16a..5a4596320e --- a/qa/rpc-tests/wallet-hd.py +++ b/qa/rpc-tests/wallet-hd.py @@ -13,9 +13,10 @@ 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(2, self.options.tmpdir, [['-usehd=0'], ['-usehd=1', '-keypool=0']], redirect_stderr=True) + self.nodes = start_nodes(2, self.options.tmpdir, self.node_args, redirect_stderr=True) self.is_network_split = False connect_nodes_bi(self.nodes, 0, 1) self.is_network_split=False @@ -27,7 +28,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.node_args[1], redirect_stderr=True) connect_nodes_bi(self.nodes, 0, 1) # Make sure we use hd, keep chainid