mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-726] Only print "no sync peer" message when not current (#646)
* [NOD-726] Only print "no sync peer" message when not current. * [NOD-726] Shorten duration in which "no sync peer" messages would not print.
This commit is contained in:
parent
2373965551
commit
80b5631a48
@ -207,12 +207,13 @@ func (sm *SyncManager) startSync() {
|
||||
return
|
||||
}
|
||||
|
||||
log.Warnf("No sync peer candidates available")
|
||||
if sm.shouldQueryPeerSelectedTips() {
|
||||
hasSyncCandidates := false
|
||||
for peer, state := range sm.peerStates {
|
||||
if !state.syncCandidate {
|
||||
continue
|
||||
}
|
||||
hasSyncCandidates = true
|
||||
|
||||
if time.Since(state.lastSelectedTipRequest) < minGetSelectedTipInterval {
|
||||
continue
|
||||
@ -220,6 +221,9 @@ func (sm *SyncManager) startSync() {
|
||||
|
||||
queueMsgGetSelectedTip(peer, state)
|
||||
}
|
||||
if !hasSyncCandidates {
|
||||
log.Warnf("No sync peer candidates available")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user