mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
Waiting condition check prior to waiting log entry (#3802)
This commit is contained in:
parent
04113baf9d
commit
5000535907
@ -92,14 +92,13 @@ func (s *InitialSync) Start() {
|
||||
// Every 5 sec, report handshake count.
|
||||
for {
|
||||
count := peerstatus.Count()
|
||||
if count >= minStatusCount {
|
||||
break
|
||||
}
|
||||
log.WithField(
|
||||
"handshakes",
|
||||
fmt.Sprintf("%d/%d", count, minStatusCount),
|
||||
).Info("Waiting for enough peer handshakes before syncing")
|
||||
|
||||
if count >= minStatusCount {
|
||||
break
|
||||
}
|
||||
time.Sleep(handshakePollingInterval)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user