Skip to content

Commit

Permalink
Merge pull request #154 from ethpandaops/pk910/fix-validator-set-for-…
Browse files Browse the repository at this point in the history
…epoch-0

fix loading validator set for epoch 0 (fix #151)
  • Loading branch information
pk910 authored Oct 16, 2024
2 parents 8c978a0 + 0e303e6 commit c720fbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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 || epoch == 0 {
if headEpoch-epoch > 2 {
return validatorSet
}

Expand All @@ -376,7 +376,7 @@ func (indexer *Indexer) GetCanonicalValidatorSet(overrideForkId *ForkKey) []*v1.
canonicalHead = dependentBlock

epochStats = indexer.epochCache.getEpochStats(epoch, dependentBlock.Root)
if epochStats == nil || epochStats.dependentState == nil || epochStats.dependentState.loadingStatus != 2 {
if epoch > 0 && (epochStats == nil || epochStats.dependentState == nil || epochStats.dependentState.loadingStatus != 2) {
continue // retry previous state
}

Expand Down

0 comments on commit c720fbd

Please sign in to comment.