mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 14:54:45 +00:00
chore!: remove pub visibility on OVERFLOW_LRU_CAPACITY and STATE_LRU_CAPACITY_NON_ZERO (#8234)
- Renames `OVERFLOW_LRU_CAPACITY` to `OVERFLOW_LRU_CAPACITY_NON_ZERO` to follow naming convention of `STATE_LRU_CAPACITY_NON_ZERO` - Makes `OVERFLOW_LRU_CAPACITY_NON_ZERO` and `STATE_LRU_CAPACITY_NON_ZERO` private since they are only used in this module - Moves `STATE_LRU_CAPACITY` into test module since it is only used for tests Co-Authored-By: Kevaundray Wedderburn <kevtheappdev@gmail.com>
This commit is contained in:
@@ -52,9 +52,8 @@ use types::non_zero_usize::new_non_zero_usize;
|
||||
///
|
||||
/// `PendingComponents` are now never removed from the cache manually are only removed via LRU
|
||||
/// eviction to prevent race conditions (#7961), so we expect this cache to be full all the time.
|
||||
pub const OVERFLOW_LRU_CAPACITY: NonZeroUsize = new_non_zero_usize(32);
|
||||
pub const STATE_LRU_CAPACITY_NON_ZERO: NonZeroUsize = new_non_zero_usize(32);
|
||||
pub const STATE_LRU_CAPACITY: usize = STATE_LRU_CAPACITY_NON_ZERO.get();
|
||||
const OVERFLOW_LRU_CAPACITY_NON_ZERO: NonZeroUsize = new_non_zero_usize(32);
|
||||
const STATE_LRU_CAPACITY_NON_ZERO: NonZeroUsize = new_non_zero_usize(32);
|
||||
|
||||
/// Cache to hold fully valid data that can't be imported to fork-choice yet. After Dencun hard-fork
|
||||
/// blocks have a sidecar of data that is received separately from the network. We call the concept
|
||||
@@ -128,7 +127,7 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
|
||||
spec: Arc<ChainSpec>,
|
||||
) -> Result<Self, AvailabilityCheckError> {
|
||||
let inner = DataAvailabilityCheckerInner::new(
|
||||
OVERFLOW_LRU_CAPACITY,
|
||||
OVERFLOW_LRU_CAPACITY_NON_ZERO,
|
||||
store,
|
||||
custody_context.clone(),
|
||||
spec.clone(),
|
||||
|
||||
Reference in New Issue
Block a user