From b167e536d0f5ae4c86d0c3da4a63337f9f0448ba Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Sat, 16 Apr 2022 21:10:24 +0200 Subject: test: refactor: use `create_lots_of_big_transactions` to dedup where possible --- test/functional/test_framework/util.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'test/functional/test_framework') diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index db59e70bf7..6c2a02bcf6 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -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) -- cgit v1.2.3