diff --git a/test/functional/abc-p2p-compactblocks.py b/test/functional/abc-p2p-compactblocks.py --- a/test/functional/abc-p2p-compactblocks.py +++ b/test/functional/abc-p2p-compactblocks.py @@ -175,9 +175,12 @@ # Create the new transaction tx = get_base_transaction() + pad_tx(tx) + tx.rehash() + tx_size = len(tx.serialize()) + 18 # Add padding to fill the block. - script_length = block_size - current_block_size - base_tx_size + script_length = block_size - current_block_size - tx_size if script_length > 510000: if script_length < 1000000: # Make sure we don't find ourselves in a position where we