From 62699d71b04c56929151c701a9127ecac621c4c2 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Wed, 17 Jul 2024 13:59:01 +1000 Subject: [PATCH] fix(cannon): Only load 1 slot of validators --- pkg/cannon/deriver/beacon/eth/v1/beacon_validators.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/cannon/deriver/beacon/eth/v1/beacon_validators.go b/pkg/cannon/deriver/beacon/eth/v1/beacon_validators.go index defe5d9a..8f655807 100644 --- a/pkg/cannon/deriver/beacon/eth/v1/beacon_validators.go +++ b/pkg/cannon/deriver/beacon/eth/v1/beacon_validators.go @@ -187,12 +187,8 @@ func (b *BeaconValidatorsDeriver) lookAhead(ctx context.Context, epochs []phase0 } for _, epoch := range epochs { - for i := uint64(0); i <= uint64(sp.SlotsPerEpoch-1); i++ { - slot := phase0.Slot(i + uint64(epoch)*uint64(sp.SlotsPerEpoch)) - - // Add the state to the preload queue so it's available when we need it - b.beacon.LazyLoadValidators(xatuethv1.SlotAsString(slot)) - } + // Add the state to the preload queue so it's available when we need it + b.beacon.LazyLoadValidators(xatuethv1.SlotAsString(phase0.Slot(uint64(epoch) * uint64(sp.SlotsPerEpoch)))) } }