Skip to content

Commit

Permalink
Merge pull request #151 from ethpandaops/pk910/fix-endless-loop
Browse files Browse the repository at this point in the history
fix endless loop when validator set cannot be loaded on dead chain
  • Loading branch information
pk910 authored Oct 14, 2024
2 parents 1dae519 + 19453b3 commit e9fe2f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion indexer/beacon/canonical.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (indexer *Indexer) GetCanonicalValidatorSet(overrideForkId *ForkKey) []*v1.

for {
epoch := chainState.EpochOfSlot(canonicalHead.Slot)
if headEpoch-epoch > 2 {
if headEpoch-epoch > 2 || epoch == 0 {
return validatorSet
}

Expand Down

0 comments on commit e9fe2f3

Please sign in to comment.