Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/util.py
Show First 20 Lines • Show All 549 Lines • ▼ Show 20 Lines | for k in range(128): | ||||
# add txout value | # add txout value | ||||
txouts = txouts + "0000000000000000" | txouts = txouts + "0000000000000000" | ||||
# add length of script_pubkey | # add length of script_pubkey | ||||
txouts = txouts + "fd0402" | txouts = txouts + "fd0402" | ||||
# add script_pubkey | # add script_pubkey | ||||
txouts = txouts + script_pubkey | txouts = txouts + script_pubkey | ||||
return txouts | return txouts | ||||
def create_tx(node, coinbase, to_address, amount): | |||||
inputs = [{"txid": coinbase, "vout": 0}] | |||||
outputs = {to_address: amount} | |||||
rawtx = node.createrawtransaction(inputs, outputs) | |||||
signresult = node.signrawtransactionwithwallet(rawtx) | |||||
assert_equal(signresult["complete"], True) | |||||
return signresult["hex"] | |||||
# Create a spend of each passed-in utxo, splicing in "txouts" to each raw | # Create a spend of each passed-in utxo, splicing in "txouts" to each raw | ||||
# transaction to make it large. See gen_return_txouts() above. | # transaction to make it large. See gen_return_txouts() above. | ||||
def create_lots_of_big_transactions(node, txouts, utxos, num, fee): | def create_lots_of_big_transactions(node, txouts, utxos, num, fee): | ||||
addr = node.getnewaddress() | addr = node.getnewaddress() | ||||
txids = [] | txids = [] | ||||
for _ in range(num): | for _ in range(num): | ||||
Show All 27 Lines |