Skip to content

Commit

Permalink
fix(cannon): Only load 1 slot of validators (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Jul 17, 2024
1 parent c259c50 commit e486281
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/cannon/deriver/beacon/eth/v1/beacon_validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
}
}

Expand Down

0 comments on commit e486281

Please sign in to comment.