Skip to content

Commit faae098

Browse files
author
MarcoFalke
committed
test: Check other fields are loaded correctly as well
1 parent fa4db92 commit faae098

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/functional/mempool_persist.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def run_test(self):
9494
assert_equal(total_fee_old, self.nodes[0].getmempoolinfo()['total_fee'])
9595
assert_equal(total_fee_old, sum(v['fees']['base'] for k, v in self.nodes[0].getrawmempool(verbose=True).items()))
9696

97-
tx_creation_time = self.nodes[0].getmempoolentry(txid=last_txid)['time']
97+
last_entry = self.nodes[0].getmempoolentry(txid=last_txid)
98+
tx_creation_time = last_entry['time']
9899
assert_greater_than_or_equal(tx_creation_time, tx_creation_time_lower)
99100
assert_greater_than_or_equal(tx_creation_time_higher, tx_creation_time)
100101

@@ -122,8 +123,8 @@ def run_test(self):
122123
fees = self.nodes[0].getmempoolentry(txid=last_txid)['fees']
123124
assert_equal(fees['base'] + Decimal('0.00001000'), fees['modified'])
124125

125-
self.log.debug('Verify time is loaded correctly')
126-
assert_equal(tx_creation_time, self.nodes[0].getmempoolentry(txid=last_txid)['time'])
126+
self.log.debug('Verify all fields are loaded correctly')
127+
assert_equal(last_entry, self.nodes[0].getmempoolentry(txid=last_txid))
127128

128129
# Verify accounting of mempool transactions after restart is correct
129130
if self.is_sqlite_compiled():

0 commit comments

Comments
 (0)