Skip to content

Commit

Permalink
test: rescan user's MiniWallet UTXOs at the end of fill_mempool
Browse files Browse the repository at this point in the history
  • Loading branch information
theStack committed Apr 30, 2024
1 parent ef448c7 commit 45bf7db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion test/functional/p2p_tx_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ def test_rejects_filter_reset(self):
self.log.info('Check that rejected tx is not requested again')
node = self.nodes[0]
fill_mempool(self, node, self.wallet)
self.wallet.rescan_utxos()
mempoolminfee = node.getmempoolinfo()['mempoolminfee']
peer = node.add_p2p_connection(TestP2PConn())
low_fee_tx = self.wallet.create_self_transfer(fee_rate=Decimal("0.9")*mempoolminfee)
Expand Down
2 changes: 2 additions & 0 deletions test/functional/test_framework/mempool_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def fill_mempool(test_framework, node, miniwallet):
assert_greater_than(tx_batch_size * num_of_batches, len(node.getrawmempool()))
# Initial tx created should not be present in the mempool anymore as it had a lower fee rate
assert tx_to_be_evicted_id not in node.getrawmempool()
# Rescan UTXOs in user's MiniWallet instance to take evicted txs into account
miniwallet.rescan_utxos()

test_framework.log.debug("Check that mempoolminfee is larger than minrelaytxfee")
assert_equal(node.getmempoolinfo()['minrelaytxfee'], Decimal('0.00001000'))
Expand Down

0 comments on commit 45bf7db

Please sign in to comment.