mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
test: fix intermittent failure in wallet_reorgsrestore.py
Wait until the node's process has fully stopped before starting a new instance. Since the same code is used in tool_wallet.py, this consolidates the behavior into a 'kill_process()' function.
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
"""Test bitcoin-wallet."""
|
||||
|
||||
import os
|
||||
import platform
|
||||
import random
|
||||
import stat
|
||||
import string
|
||||
@@ -536,9 +535,7 @@ class ToolWalletTest(BitcoinTestFramework):
|
||||
# Next cause a bunch of writes by filling the keypool
|
||||
wallet.keypoolrefill(wallet.getwalletinfo()["keypoolsize"] + 100)
|
||||
# Lastly kill bitcoind so that the LSNs don't get reset
|
||||
self.nodes[0].process.kill()
|
||||
self.nodes[0].wait_until_stopped(expected_ret_code=1 if platform.system() == "Windows" else -9)
|
||||
assert self.nodes[0].is_node_stopped()
|
||||
self.nodes[0].kill_process()
|
||||
|
||||
wallet_dump = self.nodes[0].datadir_path / "unclean_lsn.dump"
|
||||
self.assert_raises_tool_error("LSNs are not reset, this database is not completely flushed. Please reopen then close the database with a version that has BDB support", "-wallet=unclean_lsn", f"-dumpfile={wallet_dump}", "dump")
|
||||
|
||||
Reference in New Issue
Block a user