Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-magnetic-anomaly-mining.py
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
} | } | ||||
outputs.update(output) | outputs.update(output) | ||||
# Take the fee off the last output to avoid rounding errors we | # Take the fee off the last output to avoid rounding errors we | ||||
# need the exact fee later for assertions | # need the exact fee later for assertions | ||||
outputs[addr] -= fee | outputs[addr] -= fee | ||||
rawtx = mining_node.createrawtransaction(inputs, outputs) | rawtx = mining_node.createrawtransaction(inputs, outputs) | ||||
signedtx = mining_node.signrawtransaction(rawtx) | signedtx = mining_node.signrawtransactionwithwallet(rawtx) | ||||
txid = mining_node.sendrawtransaction(signedtx['hex']) | txid = mining_node.sendrawtransaction(signedtx['hex']) | ||||
# number of outputs is the same as the number of sigops in this | # number of outputs is the same as the number of sigops in this | ||||
# case | # case | ||||
transactions.update({txid: {'fee': fee, 'sigops': len(outputs)}}) | transactions.update({txid: {'fee': fee, 'sigops': len(outputs)}}) | ||||
tmpl = mining_node.getblocktemplate() | tmpl = mining_node.getblocktemplate() | ||||
assert 'proposal' in tmpl['capabilities'] | assert 'proposal' in tmpl['capabilities'] | ||||
assert 'coinbasetxn' not in tmpl | assert 'coinbasetxn' not in tmpl | ||||
Show All 21 Lines |