test: refactor: use create_lots_of_big_transactions to dedup where possible

This commit is contained in:
Sebastian Falbesoner
2022-04-16 21:10:24 +02:00
parent 8973eeb412
commit b167e536d0
2 changed files with 4 additions and 19 deletions

View File

@ -575,13 +575,8 @@ def mine_large_block(test_framework, mini_wallet, node):
# generate a 66k transaction,
# and 14 of them is close to the 1MB block limit
txouts = gen_return_txouts()
from .messages import COIN
fee = 100 * int(node.getnetworkinfo()["relayfee"] * COIN)
for _ in range(14):
tx = mini_wallet.create_self_transfer(from_node=node, fee_rate=0, mempool_valid=False)['tx']
tx.vout[0].nValue -= fee
tx.vout.extend(txouts)
mini_wallet.sendrawtransaction(from_node=node, tx_hex=tx.serialize().hex())
fee = 100 * node.getnetworkinfo()["relayfee"]
create_lots_of_big_transactions(mini_wallet, node, fee, 14, txouts)
test_framework.generate(node, 1)