@@ -3821,24 +3821,20 @@ def get_latest_committed_snapshot_seqno():
38213821 network .txs .issue (network , number_txs = 3 )
38223822 copy_new_committed_to_readonly ()
38233823
3824- primary .trigger_snapshot ()
3825- # Issue enough txs to advance commit past the snapshot
3826- network .txs .issue (network , number_txs = 3 )
3827- network .consortium .force_ledger_chunk (primary )
3828- network .txs .issue (network , number_txs = 3 )
3824+ snapshot_tx_id = primary .trigger_snapshot ()
38293825
38303826 # Wait for the snapshot to appear
38313827 timeout = 10
38323828 end_time = time .time () + timeout
38333829 snapshot_seqno = None
38343830 while time .time () < end_time :
38353831 snapshot_seqno = get_latest_committed_snapshot_seqno ()
3836- if snapshot_seqno is not None :
3832+ if snapshot_seqno is not None and snapshot_seqno >= snapshot_tx_id . seqno :
38373833 break
38383834 time .sleep (0.5 )
38393835 assert (
38403836 snapshot_seqno is not None
3841- ), f"Timed out waiting for a committed snapshot in { snapshots_dir } "
3837+ ), f"Timed out waiting for a committed snapshot covering { snapshot_tx_id . seqno } in { snapshots_dir } "
38423838 LOG .info (f"Latest committed snapshot seqno: { snapshot_seqno } " )
38433839
38443840 # Step 2: Generate many chunks AFTER the snapshot so they exceed max_retained
@@ -3906,7 +3902,8 @@ def run_post_snapshot_chunk_retention(const_args):
39063902 # if the snapshot watermark were not respected
39073903 args .files_cleanup_max_committed_ledger_chunks = 1
39083904 args .files_cleanup_interval = "1s"
3909- args .snapshot_tx_interval = 30
3905+ # High to avoid tx-count-triggered snapshots during chunk generation
3906+ args .snapshot_tx_interval = 100000
39103907
39113908 with tempfile .TemporaryDirectory () as tmp_dir :
39123909 args .common_read_only_ledger_dir = tmp_dir
0 commit comments