From d87227d6d2d6e06af1ef4ad13e2b15f1d4d43600 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 29 Sep 2016 15:34:04 +0200 Subject: [qa] nulldummy: Don't run unused code Github-Pull: #8835 Rebased-From: fa156c604e7d86d84f7731b05d7530bc91d2736b --- qa/rpc-tests/nulldummy.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'qa/rpc-tests/nulldummy.py') diff --git a/qa/rpc-tests/nulldummy.py b/qa/rpc-tests/nulldummy.py index eaed7a8c78..6488a92364 100755 --- a/qa/rpc-tests/nulldummy.py +++ b/qa/rpc-tests/nulldummy.py @@ -3,11 +3,10 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -from test_framework.test_framework import ComparisonTestFramework +from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import CTransaction, NetworkThread from test_framework.blocktools import create_coinbase, create_block, add_witness_commitment -from test_framework.comptool import TestManager from test_framework.script import CScript from io import BytesIO import time @@ -37,11 +36,12 @@ Generate 427 more blocks. [Policy/Consensus] Check that the new NULLDUMMY rules are enforced on the 432nd block. ''' -class NULLDUMMYTest(ComparisonTestFramework): +class NULLDUMMYTest(BitcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 1 + self.setup_clean_chain = True def setup_network(self): # Must set the blockversion for this test @@ -54,8 +54,6 @@ class NULLDUMMYTest(ComparisonTestFramework): self.wit_address = self.nodes[0].addwitnessaddress(self.address) self.wit_ms_address = self.nodes[0].addwitnessaddress(self.ms_address) - test = TestManager(self, self.options.tmpdir) - test.add_all_connections(self.nodes) NetworkThread().start() # Start up network handling in another thread self.coinbase_blocks = self.nodes[0].generate(2) # Block 2 coinbase_txid = [] @@ -145,4 +143,4 @@ class NULLDUMMYTest(ComparisonTestFramework): assert_equal(node.getbestblockhash(), self.lastblockhash) if __name__ == '__main__': - NULLDUMMYTest().main() \ No newline at end of file + NULLDUMMYTest().main() -- cgit v1.2.3 From 3e4abb5025f4b7415fa57d576efebe1d45fd204e Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Fri, 30 Sep 2016 00:18:13 +0800 Subject: Fix nulldummy.py test Github-Pull: #8841 Rebased-From: 46a4774d2bb9cc863e43507212ef989fa10d56d4 --- qa/rpc-tests/nulldummy.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qa/rpc-tests/nulldummy.py') diff --git a/qa/rpc-tests/nulldummy.py b/qa/rpc-tests/nulldummy.py index 6488a92364..54b7eac376 100755 --- a/qa/rpc-tests/nulldummy.py +++ b/qa/rpc-tests/nulldummy.py @@ -119,6 +119,8 @@ class NULLDUMMYTest(BitcoinTestFramework): node.sendrawtransaction(bytes_to_hex_str(tx.serialize_with_witness()), True) except JSONRPCException as exp: assert_equal(exp.error["message"], msg) + else: + assert_equal('', msg) return tx.hash -- cgit v1.2.3