diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-10-28 06:43:52 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-10-28 06:44:08 -0400 |
commit | 76dd5257f9b5705734481569c39bf115d4cb973d (patch) | |
tree | f39e9f1b9df4435483cc25684a28fba7b98c8016 /test/functional/p2p_invalid_block.py | |
parent | 1476554d3b1db5352c0de1de7524864d4bce3aac (diff) | |
parent | 9461f98c534ab64ae404085ffb309ec276e3c902 (diff) | |
download | bitcoin-76dd5257f9b5705734481569c39bf115d4cb973d.tar.xz |
Merge #14566: 0.17: qa backports
9461f98c53 Disable wallet and address book Qt tests on macOS minimal platform (Russell Yanofsky)
703a24418c descriptors.md: Refer to descriptors as describing instead of matching (Russell Yanofsky)
5f51fd6d59 doc/descriptors.md tweaks (Russell Yanofsky)
29899ecd36 Import CInv from correct module (Chun Kuan Lee)
f7adb32e38 qa: Run all tests even if wallet is not compiled (MarcoFalke)
86fadee990 qa: Premine to deterministic address with -disablewallet (MarcoFalke)
8bc1badada Test rpc_help.py failed: Check whether ZMQ is enabled or not. (Kvaciral)
24d796a6cc test: Add tests for RPC help (João Barbosa)
168efeaca6 qa: Use named args in some tests (MarcoFalke)
73e538cf6a scripted-diff: Use named arguments in feature_block (MarcoFalke)
96dc936862 scripted-diff: Pass node into p2p_segwit acceptance tests (MarcoFalke)
7ff32a6b98 qa: Add some actual witness in rpc_rawtransaction (MarcoFalke)
b72fbabe17 [qa] Use correct python index slices in example test (Suhas Daftuar)
06544faff0 qa: Add TestNode::assert_debug_log (MarcoFalke)
Pull request description:
Just the test and doc changes from #14328 to prevent that one from piling up.
Tree-SHA512: 51c1e66d346cbf51bc67b2f365448620dd9992ba4ef70592c5eb489cd50a047dab8179c86db2cafe161d8b2aa04498cc760fb5deb7eef49b39272911c74227a9
Diffstat (limited to 'test/functional/p2p_invalid_block.py')
-rwxr-xr-x | test/functional/p2p_invalid_block.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/p2p_invalid_block.py b/test/functional/p2p_invalid_block.py index 1534f362e3..0a7b83ed73 100755 --- a/test/functional/p2p_invalid_block.py +++ b/test/functional/p2p_invalid_block.py @@ -24,6 +24,9 @@ class InvalidBlockRequestTest(BitcoinTestFramework): self.setup_clean_chain = True self.extra_args = [["-whitelist=127.0.0.1"]] + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): # Add p2p connection to node0 node = self.nodes[0] # convenience reference to the node @@ -42,7 +45,7 @@ class InvalidBlockRequestTest(BitcoinTestFramework): # Save the coinbase for later block1 = block tip = block.sha256 - node.p2p.send_blocks_and_test([block1], node, True) + node.p2p.send_blocks_and_test([block1], node, success=True) self.log.info("Mature the block.") node.generate(100) @@ -79,7 +82,7 @@ class InvalidBlockRequestTest(BitcoinTestFramework): assert_equal(orig_hash, block2.rehash()) assert(block2_orig.vtx != block2.vtx) - node.p2p.send_blocks_and_test([block2], node, False, False, 16, b'bad-txns-duplicate') + node.p2p.send_blocks_and_test([block2], node, success=False, request_block=False, reject_code=16, reject_reason=b'bad-txns-duplicate') # Check transactions for duplicate inputs self.log.info("Test duplicate input block.") @@ -102,7 +105,7 @@ class InvalidBlockRequestTest(BitcoinTestFramework): block3.rehash() block3.solve() - node.p2p.send_blocks_and_test([block3], node, False, False, 16, b'bad-cb-amount') + node.p2p.send_blocks_and_test([block3], node, success=False, request_block=False, reject_code=16, reject_reason=b'bad-cb-amount') if __name__ == '__main__': InvalidBlockRequestTest().main() |