Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/util.py
Show First 20 Lines • Show All 622 Lines • ▼ Show 20 Lines | for _ in range(num): | ||||
rawtx = node.createrawtransaction(inputs, outputs) | rawtx = node.createrawtransaction(inputs, outputs) | ||||
newtx = rawtx[0:92] | newtx = rawtx[0:92] | ||||
newtx = newtx + txouts | newtx = newtx + txouts | ||||
newtx = newtx + rawtx[94:] | newtx = newtx + rawtx[94:] | ||||
signresult = node.signrawtransaction(newtx, None, None, "NONE|FORKID") | signresult = node.signrawtransaction(newtx, None, None, "NONE|FORKID") | ||||
txid = node.sendrawtransaction(signresult["hex"], True) | txid = node.sendrawtransaction(signresult["hex"], True) | ||||
txids.append(txid) | txids.append(txid) | ||||
return txids | return txids | ||||
def mine_large_block(node, utxos=None): | |||||
# generate a 66k transaction, | |||||
# and 14 of them is close to the 1MB block limit | |||||
num = 14 | |||||
txouts = gen_return_txouts() | |||||
utxos = utxos if utxos is not None else [] | |||||
if len(utxos) < num: | |||||
utxos.clear() | |||||
utxos.extend(node.listunspent()) | |||||
fee = 100 * node.getnetworkinfo()["relayfee"] | |||||
create_lots_of_big_transactions(node, txouts, utxos, num, fee=fee) | |||||
node.generate(1) |