@@ -862,13 +862,13 @@ def test_block_malleability(self):
862
862
863
863
# We can't send over the p2p network, because this is too big to relay
864
864
# TODO: repeat this test with a block that can be relayed
865
- self .nodes [0 ].submitblock (block .serialize ().hex ())
865
+ assert_equal ( 'bad-witness-nonce-size' , self .nodes [0 ].submitblock (block .serialize ().hex () ))
866
866
867
867
assert self .nodes [0 ].getbestblockhash () != block .hash
868
868
869
869
block .vtx [0 ].wit .vtxinwit [0 ].scriptWitness .stack .pop ()
870
870
assert get_virtual_size (block ) < MAX_BLOCK_BASE_SIZE
871
- self .nodes [0 ].submitblock (block .serialize ().hex ())
871
+ assert_equal ( None , self .nodes [0 ].submitblock (block .serialize ().hex () ))
872
872
873
873
assert self .nodes [0 ].getbestblockhash () == block .hash
874
874
@@ -975,14 +975,14 @@ def test_submit_block(self):
975
975
add_witness_commitment (block , nonce = 1 )
976
976
block .vtx [0 ].wit = CTxWitness () # drop the nonce
977
977
block .solve ()
978
- self .nodes [0 ].submitblock (block .serialize ().hex ())
978
+ assert_equal ( 'bad-witness-merkle-match' , self .nodes [0 ].submitblock (block .serialize ().hex () ))
979
979
assert self .nodes [0 ].getbestblockhash () != block .hash
980
980
981
981
# Now redo commitment with the standard nonce, but let bitcoind fill it in.
982
982
add_witness_commitment (block , nonce = 0 )
983
983
block .vtx [0 ].wit = CTxWitness ()
984
984
block .solve ()
985
- self .nodes [0 ].submitblock (block .serialize ().hex ())
985
+ assert_equal ( None , self .nodes [0 ].submitblock (block .serialize ().hex () ))
986
986
assert_equal (self .nodes [0 ].getbestblockhash (), block .hash )
987
987
988
988
# This time, add a tx with non-empty witness, but don't supply
@@ -997,7 +997,7 @@ def test_submit_block(self):
997
997
block_2 .vtx [0 ].vout .pop ()
998
998
block_2 .vtx [0 ].wit = CTxWitness ()
999
999
1000
- self .nodes [0 ].submitblock (block_2 .serialize ().hex ())
1000
+ assert_equal ( 'bad-txnmrklroot' , self .nodes [0 ].submitblock (block_2 .serialize ().hex () ))
1001
1001
# Tip should not advance!
1002
1002
assert self .nodes [0 ].getbestblockhash () != block_2 .hash
1003
1003
0 commit comments