Skip to content

Commit a7b46a1

Browse files
committed
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
1 parent fa53611 commit a7b46a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/mining_basic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def assert_submitblock(block, result_str_1, result_str_2=None):
145145
assert_template(node, bad_block, 'bad-cb-missing')
146146

147147
self.log.info("submitblock: Test invalid coinbase transaction")
148+
assert_raises_rpc_error(-22, "Block does not start with a coinbase", node.submitblock, CBlock().serialize().hex())
148149
assert_raises_rpc_error(-22, "Block does not start with a coinbase", node.submitblock, bad_block.serialize().hex())
149150

150151
self.log.info("getblocktemplate: Test truncated final transaction")

0 commit comments

Comments
 (0)