Skip to content

Commit

Permalink
wrong ttl value initialization in expirable lru cache (#10090)
Browse files Browse the repository at this point in the history
fix issue #10089
  • Loading branch information
domiwei authored Apr 27, 2024
1 parent d450357 commit ab0f633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cl/phase1/network/services/attestation_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ func NewAttestationService(
beaconCfg *clparams.BeaconChainConfig,
netCfg *clparams.NetworkConfig,
) AttestationService {
epochDuration := beaconCfg.SlotsPerEpoch * beaconCfg.SecondsPerSlot
epochDuration := time.Duration(beaconCfg.SlotsPerEpoch*beaconCfg.SecondsPerSlot) * time.Second
return &attestationService{
forkchoiceStore: forkchoiceStore,
committeeSubscribe: committeeSubscribe,
ethClock: ethClock,
syncedDataManager: syncedDataManager,
beaconCfg: beaconCfg,
netCfg: netCfg,
validatorAttestationSeen: lru.NewWithTTL[uint64, uint64]("validator_attestation_seen", validatorAttestationCacheSize, time.Duration(epochDuration)),
validatorAttestationSeen: lru.NewWithTTL[uint64, uint64]("validator_attestation_seen", validatorAttestationCacheSize, epochDuration),
}
}

Expand Down

0 comments on commit ab0f633

Please sign in to comment.