From e48628186289138f9e60d2a398d635700596d9fd Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Wed, 17 Jul 2024 14:02:47 +1000 Subject: [PATCH] fix(cannon): Only load 1 slot of validators (#349) --- 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)))) } }