Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mining_prioritisetransaction.py
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
confirmed_transactions = self.nodes[0].getblock( | confirmed_transactions = self.nodes[0].getblock( | ||||
self.nodes[0].getbestblockhash())['tx'] | self.nodes[0].getbestblockhash())['tx'] | ||||
# Pull the highest fee-rate transaction from a block | # Pull the highest fee-rate transaction from a block | ||||
high_fee_tx = confirmed_transactions[1] | high_fee_tx = confirmed_transactions[1] | ||||
# Something high-fee should have been mined! | # Something high-fee should have been mined! | ||||
assert high_fee_tx != None | assert high_fee_tx is not None | ||||
# Add a prioritisation before a tx is in the mempool (de-prioritising a | # Add a prioritisation before a tx is in the mempool (de-prioritising a | ||||
# high-fee transaction so that it's now low fee). | # high-fee transaction so that it's now low fee). | ||||
# | # | ||||
# NOTE WELL: gettransaction returns the fee as a negative number and | # NOTE WELL: gettransaction returns the fee as a negative number and | ||||
# as fractional coins. However, the prioritisetransaction expects a | # as fractional coins. However, the prioritisetransaction expects a | ||||
# number of satoshi to add or subtract from the actual fee. | # number of satoshi to add or subtract from the actual fee. | ||||
# Thus the conversation here is simply int(tx_fee*COIN) to remove all fees, and then | # Thus the conversation here is simply int(tx_fee*COIN) to remove all fees, and then | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |