Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-high_priority_transaction.py
Show All 24 Lines | def create_small_transactions(self, node, utxos, num, fee): | ||||
txids = [] | txids = [] | ||||
for _ in range(num): | for _ in range(num): | ||||
t = utxos.pop() | t = utxos.pop() | ||||
inputs = [{"txid": t["txid"], "vout": t["vout"]}] | inputs = [{"txid": t["txid"], "vout": t["vout"]}] | ||||
outputs = {} | outputs = {} | ||||
change = t['amount'] - fee | change = t['amount'] - fee | ||||
outputs[addr] = satoshi_round(change) | outputs[addr] = satoshi_round(change) | ||||
rawtx = node.createrawtransaction(inputs, outputs) | rawtx = node.createrawtransaction(inputs, outputs) | ||||
signresult = node.signrawtransaction( | signresult = node.signrawtransactionwithwallet( | ||||
rawtx, None, None, "NONE|FORKID") | rawtx, 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 generate_high_priotransactions(self, node, count): | def generate_high_priotransactions(self, node, count): | ||||
# generate a bunch of spendable utxos | # generate a bunch of spendable utxos | ||||
self.txouts = gen_return_txouts() | self.txouts = gen_return_txouts() | ||||
# create 150 simple one input one output hi prio txns | # create 150 simple one input one output hi prio txns | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |