@@ -12,7 +12,7 @@ use crate::light_client_server_cache::LightClientServerCache;
1212use crate :: migrate:: { BackgroundMigrator , MigratorConfig } ;
1313use crate :: persisted_beacon_chain:: PersistedBeaconChain ;
1414use crate :: shuffling_cache:: { BlockShufflingIds , ShufflingCache } ;
15- use crate :: snapshot_cache:: { SnapshotCache , DEFAULT_SNAPSHOT_CACHE_SIZE } ;
15+ use crate :: snapshot_cache:: SnapshotCache ;
1616use crate :: timeout_rw_lock:: TimeoutRwLock ;
1717use crate :: validator_monitor:: { ValidatorMonitor , ValidatorMonitorConfig } ;
1818use crate :: validator_pubkey_cache:: ValidatorPubkeyCache ;
@@ -870,6 +870,7 @@ where
870870 let head_for_snapshot_cache = head_snapshot. clone ( ) ;
871871 let canonical_head = CanonicalHead :: new ( fork_choice, Arc :: new ( head_snapshot) ) ;
872872 let shuffling_cache_size = self . chain_config . shuffling_cache_size ;
873+ let snapshot_cache_size = self . chain_config . snapshot_cache_size ;
873874
874875 // Calculate the weak subjectivity point in which to backfill blocks to.
875876 let genesis_backfill_slot = if self . chain_config . genesis_backfill {
@@ -946,7 +947,7 @@ where
946947 event_handler : self . event_handler ,
947948 head_tracker,
948949 snapshot_cache : TimeoutRwLock :: new ( SnapshotCache :: new (
949- DEFAULT_SNAPSHOT_CACHE_SIZE ,
950+ snapshot_cache_size ,
950951 head_for_snapshot_cache,
951952 ) ) ,
952953 shuffling_cache : TimeoutRwLock :: new ( ShufflingCache :: new (
0 commit comments