diff --git a/test/functional/test_framework/txtools.py b/test/functional/test_framework/txtools.py --- a/test/functional/test_framework/txtools.py +++ b/test/functional/test_framework/txtools.py @@ -23,18 +23,17 @@ tx.vout.append(CTxOut(0, CScript([OP_RETURN]))) else: padding = random.randrange( - 1 << 8 * padding_len - 1, 1 << 8 * padding_len) + 1 << 8 * padding_len - 2, 1 << 8 * padding_len - 1) tx.vout.append( CTxOut(0, CScript([padding, OP_RETURN]))) curr_size = len(tx.serialize()) tx.rehash() -# Pad outputs until it reaches at least min_size +# Pad outputs until it reaches at least min_size def pad_raw_tx(rawtx_hex, min_size=None): - tx = CTransaction() FromHex(tx, rawtx_hex) pad_tx(tx, min_size)