mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Use helper to calculate epoch (#4497)
This commit is contained in:
committed by
Nishant Das
parent
4e6c8c5b1a
commit
3c5d5bfc7b
@@ -168,7 +168,7 @@ func (s *Service) waitForMinimumPeers() {
|
||||
required = flags.Get().MinimumSyncPeers
|
||||
}
|
||||
for {
|
||||
_, _, peers := s.p2p.Peers().BestFinalized(params.BeaconConfig().MaxPeersToSync, s.chain.HeadSlot()/params.BeaconConfig().SlotsPerEpoch)
|
||||
_, _, peers := s.p2p.Peers().BestFinalized(params.BeaconConfig().MaxPeersToSync, helpers.SlotToEpoch(s.chain.HeadSlot()))
|
||||
if len(peers) >= required {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user