mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 02:11:24 +02:00
RPC/Mining: Restore API compatibility for prioritisetransaction
Breaking API serves no purpose other than to be incompatible with older versions and other implementations that do support priority
This commit is contained in:
@ -46,7 +46,7 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
|
||||
|
||||
# add a fee delta to something in the cheapest bucket and make sure it gets mined
|
||||
# also check that a different entry in the cheapest bucket is NOT mined
|
||||
self.nodes[0].prioritisetransaction(txids[0][0], int(3*base_fee*COIN))
|
||||
self.nodes[0].prioritisetransaction(txid=txids[0][0], fee_delta=int(3*base_fee*COIN))
|
||||
|
||||
self.nodes[0].generate(1)
|
||||
|
||||
@ -65,7 +65,7 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
|
||||
|
||||
# Add a prioritisation before a tx is in the mempool (de-prioritising a
|
||||
# high-fee transaction so that it's now low fee).
|
||||
self.nodes[0].prioritisetransaction(high_fee_tx, -int(2*base_fee*COIN))
|
||||
self.nodes[0].prioritisetransaction(txid=high_fee_tx, fee_delta=-int(2*base_fee*COIN))
|
||||
|
||||
# Add everything back to mempool
|
||||
self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
|
||||
@ -109,7 +109,7 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
|
||||
# This is a less than 1000-byte transaction, so just set the fee
|
||||
# to be the minimum for a 1000 byte transaction and check that it is
|
||||
# accepted.
|
||||
self.nodes[0].prioritisetransaction(tx_id, int(self.relayfee*COIN))
|
||||
self.nodes[0].prioritisetransaction(txid=tx_id, fee_delta=int(self.relayfee*COIN))
|
||||
|
||||
self.log.info("Assert that prioritised free transaction is accepted to mempool")
|
||||
assert_equal(self.nodes[0].sendrawtransaction(tx_hex), tx_id)
|
||||
@ -120,7 +120,7 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
|
||||
mock_time = int(time.time())
|
||||
self.nodes[0].setmocktime(mock_time)
|
||||
template = self.nodes[0].getblocktemplate()
|
||||
self.nodes[0].prioritisetransaction(tx_id, -int(self.relayfee*COIN))
|
||||
self.nodes[0].prioritisetransaction(txid=tx_id, fee_delta=-int(self.relayfee*COIN))
|
||||
self.nodes[0].setmocktime(mock_time+10)
|
||||
new_template = self.nodes[0].getblocktemplate()
|
||||
|
||||
|
Reference in New Issue
Block a user