@@ -790,7 +790,7 @@ def test_witness_commitments(self):
790
790
block_3 .rehash ()
791
791
block_3 .solve ()
792
792
793
- test_witness_block (self .nodes [0 ], self .test_node , block_3 , accepted = False )
793
+ test_witness_block (self .nodes [0 ], self .test_node , block_3 , accepted = False , reason = 'bad-witness-merkle-match' )
794
794
795
795
# Add a different commitment with different nonce, but in the
796
796
# right location, and with some funds burned(!).
@@ -856,7 +856,7 @@ def test_block_malleability(self):
856
856
# Change the nonce -- should not cause the block to be permanently
857
857
# failed
858
858
block .vtx [0 ].wit .vtxinwit [0 ].scriptWitness .stack = [ser_uint256 (1 )]
859
- test_witness_block (self .nodes [0 ], self .test_node , block , accepted = False )
859
+ test_witness_block (self .nodes [0 ], self .test_node , block , accepted = False , reason = 'bad-witness-merkle-match' )
860
860
861
861
# Changing the witness reserved value doesn't change the block hash
862
862
block .vtx [0 ].wit .vtxinwit [0 ].scriptWitness .stack = [ser_uint256 (0 )]
@@ -921,7 +921,7 @@ def test_witness_block_size(self):
921
921
# limit
922
922
assert len (block .serialize ()) > 2 * 1024 * 1024
923
923
924
- test_witness_block (self .nodes [0 ], self .test_node , block , accepted = False )
924
+ test_witness_block (self .nodes [0 ], self .test_node , block , accepted = False , reason = 'bad-blk-weight' )
925
925
926
926
# Now resize the second transaction to make the block fit.
927
927
cur_length = len (block .vtx [- 1 ].wit .vtxinwit [0 ].scriptWitness .stack [0 ])
@@ -1180,7 +1180,7 @@ def serialize_with_witness(self):
1180
1180
1181
1181
block = self .build_next_block ()
1182
1182
self .update_witness_block_with_transactions (block , [tx2 ])
1183
- test_witness_block (self .nodes [0 ], self .test_node , block , accepted = False )
1183
+ test_witness_block (self .nodes [0 ], self .test_node , block , accepted = False , reason = 'bad-txnmrklroot' )
1184
1184
1185
1185
# Now try using a too short vtxinwit
1186
1186
tx2 .wit .vtxinwit .pop ()
@@ -1419,7 +1419,7 @@ def test_premature_coinbase_witness_spend(self):
1419
1419
self .sync_blocks ()
1420
1420
block2 = self .build_next_block ()
1421
1421
self .update_witness_block_with_transactions (block2 , [spend_tx ])
1422
- test_witness_block (self .nodes [0 ], self .test_node , block2 , accepted = False )
1422
+ test_witness_block (self .nodes [0 ], self .test_node , block2 , accepted = False , reason = 'bad-txns-premature-spend-of-coinbase' )
1423
1423
1424
1424
# Advancing one more block should allow the spend.
1425
1425
self .generate (self .nodes [0 ], 1 )
@@ -1922,7 +1922,7 @@ def test_witness_sigops(self):
1922
1922
1923
1923
block_2 = self .build_next_block ()
1924
1924
self .update_witness_block_with_transactions (block_2 , [tx2 ])
1925
- test_witness_block (self .nodes [0 ], self .test_node , block_2 , accepted = False )
1925
+ test_witness_block (self .nodes [0 ], self .test_node , block_2 , accepted = False , reason = 'bad-blk-sigops' )
1926
1926
1927
1927
# Try dropping the last input in tx2, and add an output that has
1928
1928
# too many sigops (contributing to legacy sigop count).
@@ -1935,7 +1935,7 @@ def test_witness_sigops(self):
1935
1935
tx2 .rehash ()
1936
1936
block_3 = self .build_next_block ()
1937
1937
self .update_witness_block_with_transactions (block_3 , [tx2 ])
1938
- test_witness_block (self .nodes [0 ], self .test_node , block_3 , accepted = False )
1938
+ test_witness_block (self .nodes [0 ], self .test_node , block_3 , accepted = False , reason = 'bad-blk-sigops' )
1939
1939
1940
1940
# If we drop the last checksig in this output, the tx should succeed.
1941
1941
block_4 = self .build_next_block ()
0 commit comments