mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
Clear initial sync state caches after round robin sync (#4817)
* Clear initial sync state caches after round robin sync * fix test mock * lint Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
1a5c5153be
commit
4598344918
@ -231,3 +231,6 @@ func (ms *ChainService) Participation(epoch uint64) *precompute.Balance {
|
||||
func (ms *ChainService) IsValidAttestation(ctx context.Context, att *ethpb.Attestation) bool {
|
||||
return ms.ValidAttestation
|
||||
}
|
||||
|
||||
// ClearCachedStates does nothing.
|
||||
func (ms *ChainService) ClearCachedStates() {}
|
||||
|
@ -43,6 +43,7 @@ const refreshTime = 6 * time.Second
|
||||
func (s *Service) roundRobinSync(genesis time.Time) error {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
defer s.chain.ClearCachedStates()
|
||||
|
||||
if cfg := featureconfig.Get(); cfg.EnableSkipSlotsCache {
|
||||
cfg.EnableSkipSlotsCache = false
|
||||
|
@ -25,6 +25,7 @@ var _ = shared.Service(&Service{})
|
||||
type blockchainService interface {
|
||||
blockchain.BlockReceiver
|
||||
blockchain.HeadFetcher
|
||||
ClearCachedStates()
|
||||
}
|
||||
|
||||
const (
|
||||
|
Loading…
Reference in New Issue
Block a user