diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index d7af22926c8885..b64cbcddeb6240 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -1725,7 +1725,7 @@ fn process_next_slots( blockstore: &Blockstore, leader_schedule_cache: &LeaderScheduleCache, pending_slots: &mut Vec<(SlotMeta, Bank, Hash)>, - halt_at_slot: Option, + opts: &ProcessOptions, ) -> result::Result<(), BlockstoreProcessorError> { if meta.next_slots.is_empty() { return Ok(()); @@ -1733,7 +1733,13 @@ fn process_next_slots( // This is a fork point if there are multiple children, create a new child bank for each fork for next_slot in &meta.next_slots { - if halt_at_slot.is_some_and(|halt_at_slot| *next_slot > halt_at_slot) { + if opts + .halt_at_slot + .is_some_and(|halt_at_slot| *next_slot > halt_at_slot) + { + continue; + } + if !opts.allow_dead_slots && blockstore.is_dead(*next_slot) { continue; } @@ -1812,7 +1818,7 @@ fn load_frozen_forks( blockstore, leader_schedule_cache, &mut pending_slots, - opts.halt_at_slot, + opts, )?; let on_halt_store_hash_raw_data_for_debug = opts.on_halt_store_hash_raw_data_for_debug; @@ -1991,7 +1997,7 @@ fn load_frozen_forks( blockstore, leader_schedule_cache, &mut pending_slots, - opts.halt_at_slot, + opts, )?; } } else if on_halt_store_hash_raw_data_for_debug {