mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 22:42:04 +01:00
test: added coverage to mining_basic.py
Included a test that checks if we call submitblock with block.vtx.empty() then it throws an rpc deserialization error, currently we only test if !block.vtx->IsCoinBase() throws an rpc deserialization error
This commit is contained in:
parent
fa53611cf1
commit
a7b46a1fea
1 changed files with 1 additions and 0 deletions
|
@ -145,6 +145,7 @@ class MiningTest(BitcoinTestFramework):
|
|||
assert_template(node, bad_block, 'bad-cb-missing')
|
||||
|
||||
self.log.info("submitblock: Test invalid coinbase transaction")
|
||||
assert_raises_rpc_error(-22, "Block does not start with a coinbase", node.submitblock, CBlock().serialize().hex())
|
||||
assert_raises_rpc_error(-22, "Block does not start with a coinbase", node.submitblock, bad_block.serialize().hex())
|
||||
|
||||
self.log.info("getblocktemplate: Test truncated final transaction")
|
||||
|
|
Loading…
Add table
Reference in a new issue