Skip to content

Commit

Permalink
test: assert can't activate snapshot based chainstate more than once
Browse files Browse the repository at this point in the history
In ActivateSnapshot we return false if there already exists a
snapshot-based chainstate this is a test that asserts that happens
  • Loading branch information
kevkevinpal committed May 9, 2024
1 parent 4300325 commit 2cd4222
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/functional/feature_assumeutxo.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ def run_test(self):

self.log.info(f"Loading snapshot into second node from {dump_output['path']}")
loaded = n1.loadtxoutset(dump_output['path'])

self.log.info(f"Test bitcoind should fail when trying to activate snapshot more than once.")
with n1.assert_debug_log(expected_msgs=["[snapshot] can't activate a snapshot-based chainstate more than once"]):
assert_raises_rpc_error(-32603, "Unable to load UTXO snapshot", n1.loadtxoutset, dump_output['path'])

assert_equal(loaded['coins_loaded'], SNAPSHOT_BASE_HEIGHT)
assert_equal(loaded['base_height'], SNAPSHOT_BASE_HEIGHT)

Expand Down

0 comments on commit 2cd4222

Please sign in to comment.