mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
test: assert serialized txouts size of gen_return_txouts
helper
This assures that changing the internals of the helper function still leads to the expected outcome sizewise (preparation for the next commit).
This commit is contained in:
parent
cc22bd7f70
commit
f319287d81
1 changed files with 3 additions and 1 deletions
|
@ -499,7 +499,8 @@ def chain_transaction(node, parent_txids, vouts, value, fee, num_outputs):
|
|||
|
||||
|
||||
# Create large OP_RETURN txouts that can be appended to a transaction
|
||||
# to make it large (helper for constructing large transactions).
|
||||
# to make it large (helper for constructing large transactions). The
|
||||
# total serialized size of the txouts is about 66k vbytes.
|
||||
def gen_return_txouts():
|
||||
# Some pre-processing to create a bunch of OP_RETURN txouts to insert into transactions we create
|
||||
# So we have big transactions (and therefore can't fit very many into each block)
|
||||
|
@ -515,6 +516,7 @@ def gen_return_txouts():
|
|||
txout.scriptPubKey = bytes.fromhex(script_pubkey)
|
||||
for _ in range(128):
|
||||
txouts.append(txout)
|
||||
assert_equal(sum([len(txout.serialize()) for txout in txouts]), 67456)
|
||||
return txouts
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue