test: remove mempool.dat before copying

Renaming mempool.dat from old node to new node fails on windows as the
file already exists.
This commit is contained in:
Max Edwards 2025-06-25 21:06:10 +01:00
parent 67a6b20d50
commit 3dc90d69a6
1 changed files with 1 additions and 0 deletions

View File

@ -56,6 +56,7 @@ class MempoolCompatibilityTest(BitcoinTestFramework):
self.log.info("Move mempool.dat from old to new node") self.log.info("Move mempool.dat from old to new node")
old_node_mempool = old_node.chain_path / "mempool.dat" old_node_mempool = old_node.chain_path / "mempool.dat"
new_node_mempool = new_node.chain_path / "mempool.dat" new_node_mempool = new_node.chain_path / "mempool.dat"
new_node_mempool.unlink()
old_node_mempool.rename(new_node_mempool) old_node_mempool.rename(new_node_mempool)
self.log.info("Start new node and verify mempool contains the tx") self.log.info("Start new node and verify mempool contains the tx")