mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 23:41:12 +02:00
Merge bitcoin/bitcoin#33052: [29.x] backport #32069
c6fe6971bf
doc: update release notes for 29.x (fanquake)380b5aded2
test: fix intermittent failure in wallet_reorgsrestore.py (furszy) Pull request description: Backport https://github.com/bitcoin/bitcoin/pull/32069 to 29. This is a test flakiness fix for https://github.com/bitcoin/bitcoin/pull/31757, which was backported to 29 in https://github.com/bitcoin/bitcoin/pull/32589. ACKs for top commit: marcofleon: ACKc6fe6971bf
Tree-SHA512: 82517eef67c8d0fe57e70cb769d1b040ea8dea41c2d2e5b442477e1c7add7d7bac1c4aabbebc5b7d440db5b7bf00f1d70dc6ffb375b7a2e77d9599c543579122
This commit is contained in:
@@ -55,6 +55,7 @@ Notable changes
|
|||||||
|
|
||||||
### Test
|
### Test
|
||||||
|
|
||||||
|
- #32069 test: fix intermittent failure in wallet_reorgsrestore.py
|
||||||
- #32286 test: Handle empty string returned by CLI as None in RPC tests
|
- #32286 test: Handle empty string returned by CLI as None in RPC tests
|
||||||
- #32312 test: Fix feature_pruning test after nTime typo fix
|
- #32312 test: Fix feature_pruning test after nTime typo fix
|
||||||
- #32336 test: Suppress upstream -Wduplicate-decl-specifier in bpfcc
|
- #32336 test: Suppress upstream -Wduplicate-decl-specifier in bpfcc
|
||||||
|
@@ -443,6 +443,11 @@ class TestNode():
|
|||||||
kwargs["expected_ret_code"] = 1 if expect_error else 0 # Whether node shutdown return EXIT_FAILURE or EXIT_SUCCESS
|
kwargs["expected_ret_code"] = 1 if expect_error else 0 # Whether node shutdown return EXIT_FAILURE or EXIT_SUCCESS
|
||||||
self.wait_until(lambda: self.is_node_stopped(**kwargs), timeout=timeout)
|
self.wait_until(lambda: self.is_node_stopped(**kwargs), timeout=timeout)
|
||||||
|
|
||||||
|
def kill_process(self):
|
||||||
|
self.process.kill()
|
||||||
|
self.wait_until_stopped(expected_ret_code=1 if platform.system() == "Windows" else -9)
|
||||||
|
assert self.is_node_stopped()
|
||||||
|
|
||||||
def replace_in_config(self, replacements):
|
def replace_in_config(self, replacements):
|
||||||
"""
|
"""
|
||||||
Perform replacements in the configuration file.
|
Perform replacements in the configuration file.
|
||||||
|
@@ -5,7 +5,6 @@
|
|||||||
"""Test bitcoin-wallet."""
|
"""Test bitcoin-wallet."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
|
||||||
import random
|
import random
|
||||||
import stat
|
import stat
|
||||||
import string
|
import string
|
||||||
@@ -537,9 +536,7 @@ class ToolWalletTest(BitcoinTestFramework):
|
|||||||
# Next cause a bunch of writes by filling the keypool
|
# Next cause a bunch of writes by filling the keypool
|
||||||
wallet.keypoolrefill(wallet.getwalletinfo()["keypoolsize"] + 100)
|
wallet.keypoolrefill(wallet.getwalletinfo()["keypoolsize"] + 100)
|
||||||
# Lastly kill bitcoind so that the LSNs don't get reset
|
# Lastly kill bitcoind so that the LSNs don't get reset
|
||||||
self.nodes[0].process.kill()
|
self.nodes[0].kill_process()
|
||||||
self.nodes[0].wait_until_stopped(expected_ret_code=1 if platform.system() == "Windows" else -9)
|
|
||||||
assert self.nodes[0].is_node_stopped()
|
|
||||||
|
|
||||||
wallet_dump = self.nodes[0].datadir_path / "unclean_lsn.dump"
|
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")
|
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")
|
||||||
|
@@ -115,7 +115,7 @@ class ReorgsRestoreTest(BitcoinTestFramework):
|
|||||||
assert_equal(wallet.gettransaction(coinbase_tx_id)['details'][0]['abandoned'], True)
|
assert_equal(wallet.gettransaction(coinbase_tx_id)['details'][0]['abandoned'], True)
|
||||||
|
|
||||||
# Abort process abruptly to mimic an unclean shutdown (no chain state flush to disk)
|
# Abort process abruptly to mimic an unclean shutdown (no chain state flush to disk)
|
||||||
node.process.kill()
|
node.kill_process()
|
||||||
|
|
||||||
# Restart the node and confirm that it has not persisted the last chain state changes to disk
|
# Restart the node and confirm that it has not persisted the last chain state changes to disk
|
||||||
self.start_node(0)
|
self.start_node(0)
|
||||||
|
Reference in New Issue
Block a user