Skip to content

Commit

Permalink
Merge branch 'master' into electra-support
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed May 13, 2024
2 parents 1357531 + fa04d2c commit e29d856
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions indexer/consensus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

v1 "github.com/attestantio/go-eth2-client/api/v1"
"github.com/attestantio/go-eth2-client/spec/phase0"
"github.com/ethereum/go-ethereum/common"

"github.com/ethpandaops/dora/rpc"
"github.com/ethpandaops/dora/utils"
Expand Down Expand Up @@ -390,6 +391,10 @@ func (client *ConsensusClient) prefillCache(finalizedSlot uint64, latestHeader *
break
}
parentRoot = parentHead.Message.ParentRoot[:]
if bytes.Equal(parentRoot, common.FromHex("0x0000000000000000000000000000000000000000000000000000000000000000")) {
logger.WithField("client", client.clientName).Infof("prefill cache: reached null root (genesis)")
break
}
}

// ensure epoch stats for loaded slots
Expand Down Expand Up @@ -522,6 +527,10 @@ func (client *ConsensusClient) ensureParentBlocks(currentBlock *CacheBlock) erro
break
}
parentRoot = parentHead.Message.ParentRoot[:]
if bytes.Equal(parentRoot, common.FromHex("0x0000000000000000000000000000000000000000000000000000000000000000")) {
logger.WithField("client", client.clientName).Infof("backfill cache: reached null root (genesis)")
break
}
}
return nil
}
Expand Down

0 comments on commit e29d856

Please sign in to comment.