Skip to content

Commit

Permalink
Increase allowed empty slots processing slot amount in state cache by…
Browse files Browse the repository at this point in the history
… a multiplier
  • Loading branch information
povi committed Jan 23, 2025
1 parent 1dfdacb commit 457246d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fork_choice_store/src/state_cache_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ use types::{

use crate::Store;

const ALLOWED_EMPTY_SLOTS_MULTIPLIER: u64 = 2;

pub struct StateCacheProcessor<P: Preset> {
state_cache: StateCache<P>,
}
Expand Down Expand Up @@ -186,7 +188,7 @@ fn process_slots<P: Preset>(
}

let state_slot = state.slot();
let max_empty_slots = store.store_config().max_empty_slots;
let max_empty_slots = store.store_config().max_empty_slots * ALLOWED_EMPTY_SLOTS_MULTIPLIER;
let is_forward_synced = store.is_forward_synced();

if !is_forward_synced && state_slot + max_empty_slots < slot {
Expand Down

0 comments on commit 457246d

Please sign in to comment.