mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 00:34:01 +02:00
Merge #20944: rpc: Return total fee in getmempoolinfo
fa362064e3rpc: Return total fee in mempool (MarcoFalke) Pull request description: This avoids having to loop over the whole mempool to query each entry's fee ACKs for top commit: achow101: ACKfa362064e3glozow: ACKfa362064e3🧸 jnewbery: ACKfa362064e3Tree-SHA512: e2fa1664df39c9e187f9229fc35764ccf436f6f75889c5a206d34fff473fc21efbf2bb143f4ca7895c27659218c22884d0ec4195e7a536a5a96973fc9dd82d08
This commit is contained in:
@@ -69,6 +69,8 @@ class MempoolPersistTest(BitcoinTestFramework):
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 5)
|
||||
assert_equal(len(self.nodes[1].getrawmempool()), 5)
|
||||
|
||||
total_fee_old = self.nodes[0].getmempoolinfo()['total_fee']
|
||||
|
||||
self.log.debug("Prioritize a transaction on node0")
|
||||
fees = self.nodes[0].getmempoolentry(txid=last_txid)['fees']
|
||||
assert_equal(fees['base'], fees['modified'])
|
||||
@@ -76,6 +78,10 @@ class MempoolPersistTest(BitcoinTestFramework):
|
||||
fees = self.nodes[0].getmempoolentry(txid=last_txid)['fees']
|
||||
assert_equal(fees['base'] + Decimal('0.00001000'), fees['modified'])
|
||||
|
||||
self.log.info('Check the total base fee is unchanged after prioritisetransaction')
|
||||
assert_equal(total_fee_old, self.nodes[0].getmempoolinfo()['total_fee'])
|
||||
assert_equal(total_fee_old, sum(v['fees']['base'] for k, v in self.nodes[0].getrawmempool(verbose=True).items()))
|
||||
|
||||
tx_creation_time = self.nodes[0].getmempoolentry(txid=last_txid)['time']
|
||||
assert_greater_than_or_equal(tx_creation_time, tx_creation_time_lower)
|
||||
assert_greater_than_or_equal(tx_creation_time_higher, tx_creation_time)
|
||||
|
||||
Reference in New Issue
Block a user