mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
test, assumeutxo: Use assert_debug_log for error details
This is a follow-up on the invalid hash dump fix PR #28698. https://github.com/bitcoin/bitcoin/pull/28698#pullrequestreview-1698178157
This commit is contained in:
parent
19d1ba1b41
commit
7de7685372
1 changed files with 8 additions and 2 deletions
|
@ -118,8 +118,14 @@ class AssumeutxoTest(BitcoinTestFramework):
|
|||
chainstate_snapshot_path.mkdir()
|
||||
with open(chainstate_snapshot_path / "base_blockhash", 'wb') as f:
|
||||
f.write(b'z' * 32)
|
||||
expected_error = f"Error: A fatal internal error occurred, see debug.log for details"
|
||||
self.nodes[0].assert_start_raises_init_error(expected_msg=expected_error)
|
||||
|
||||
def expected_error(log_msg="", error_msg=""):
|
||||
with self.nodes[0].assert_debug_log([log_msg]):
|
||||
self.nodes[0].assert_start_raises_init_error(expected_msg=error_msg)
|
||||
|
||||
expected_error_msg = f"Error: A fatal internal error occurred, see debug.log for details"
|
||||
error_details = f"Assumeutxo data not found for the given blockhash"
|
||||
expected_error(log_msg=error_details, error_msg=expected_error_msg)
|
||||
|
||||
# resurrect node again
|
||||
rmtree(chainstate_snapshot_path)
|
||||
|
|
Loading…
Reference in a new issue