Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-magnetic-anomaly-mining.py
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
signedtx = mining_node.signrawtransactionwithwallet(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 | |||||
# Check the template transaction metadata and ordering | # Check the template transaction metadata and ordering | ||||
last_txid = 0 | last_txid = 0 | ||||
for txn in tmpl['transactions'][1:]: | for txn in tmpl['transactions'][1:]: | ||||
txid = txn['txid'] | txid = txn['txid'] | ||||
txnMetadata = transactions[txid] | txnMetadata = transactions[txid] | ||||
expectedFeeSats = int(txnMetadata['fee'] * 10**8) | expectedFeeSats = int(txnMetadata['fee'] * 10**8) | ||||
expectedSigOps = txnMetadata['sigops'] | expectedSigOps = txnMetadata['sigops'] | ||||
Show All 13 Lines |