test: Check submitblock return values

This commit is contained in:
MarcoFalke
2020-04-22 16:57:19 -04:00
parent a7a6f1ff41
commit fa262712ca
3 changed files with 8 additions and 8 deletions

View File

@@ -111,7 +111,7 @@ class NULLDUMMYTest(BitcoinTestFramework):
witness and add_witness_commitment(block)
block.rehash()
block.solve()
node.submitblock(block.serialize().hex())
assert_equal(None if accept else 'block-validation-failed', node.submitblock(block.serialize().hex()))
if (accept):
assert_equal(node.getbestblockhash(), block.hash)
self.tip = block.sha256