Skip to content

Commit b259b0e

Browse files
committed
[Test] Assumeutxo: ensure failure when importing a snapshot twice
1 parent 7973a67 commit b259b0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/feature_assumeutxo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,10 @@ def check_tx_counts(final: bool) -> None:
395395
assert_equal(snapshot['snapshot_blockhash'], dump_output['base_hash'])
396396
assert_equal(snapshot['validated'], False)
397397

398+
self.log.info("Check that loading the snapshot again will fail because there is already an active snapshot.")
399+
with n2.assert_debug_log(expected_msgs=["[snapshot] can't activate a snapshot-based chainstate more than once"]):
400+
assert_raises_rpc_error(-32603, "Unable to load UTXO snapshot", n2.loadtxoutset, dump_output['path'])
401+
398402
self.connect_nodes(0, 2)
399403
self.wait_until(lambda: n2.getchainstates()['chainstates'][-1]['blocks'] == FINAL_HEIGHT)
400404
self.sync_blocks()

0 commit comments

Comments
 (0)