mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Chain info: Return err if checkpoint is nil (#10729)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -173,7 +173,12 @@ func (s *Service) waitForMinimumPeers() {
|
||||
required = flags.Get().MinimumSyncPeers
|
||||
}
|
||||
for {
|
||||
_, peers := s.cfg.P2P.Peers().BestNonFinalized(flags.Get().MinimumSyncPeers, s.cfg.Chain.FinalizedCheckpt().Epoch)
|
||||
cp, err := s.cfg.Chain.FinalizedCheckpt()
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Could not retrieve finalized checkpoint")
|
||||
return
|
||||
}
|
||||
_, peers := s.cfg.P2P.Peers().BestNonFinalized(flags.Get().MinimumSyncPeers, cp.Epoch)
|
||||
if len(peers) >= required {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user