Skip to content

Commit

Permalink
Make ci/run-sanity.sh more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Sep 11, 2024
1 parent 8d2187e commit 9208fb8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ci/run-sanity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,13 @@ $solana_ledger_tool verify --abort-on-invalid-block \
--ledger config/snapshot-ledger --block-verification-method unified-scheduler

first_simulated_slot=$((latest_slot / 2))
purge_slot=$((first_simulated_slot + latest_slot / 4))
echo "First simulated slot: ${first_simulated_slot}"
touch config/ledger/simulate_block_production_allowed
# Purge some slots so that later verify fails if sim is broken
$solana_ledger_tool purge --ledger config/ledger "$purge_slot"
$solana_ledger_tool simulate-block-production --ledger config/ledger \
--first-simulated-slot $first_simulated_slot
# Slots should be available and correctly replayable upto snapshot_slot at least.
$solana_ledger_tool verify --abort-on-invalid-block \
--ledger config/ledger --enable-hash-overrides
--ledger config/ledger --enable-hash-overrides --halt-at-slot "$snapshot_slot"

0 comments on commit 9208fb8

Please sign in to comment.