Merge pull request #5105 from filecoin-project/feat/log-insufficent-peers
sync: log a message when there aren't enough peers
This commit is contained in:
commit
ba7854d645
@ -59,4 +59,5 @@ const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
|||||||
|
|
||||||
const PropagationDelaySecs = uint64(6)
|
const PropagationDelaySecs = uint64(6)
|
||||||
|
|
||||||
|
// BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start
|
||||||
const BootstrapPeerThreshold = 4
|
const BootstrapPeerThreshold = 4
|
||||||
|
@ -203,6 +203,7 @@ func (sm *syncManager) handlePeerHead(head peerHead) {
|
|||||||
|
|
||||||
// not yet; do we have enough peers?
|
// not yet; do we have enough peers?
|
||||||
if len(sm.heads) < BootstrapPeerThreshold {
|
if len(sm.heads) < BootstrapPeerThreshold {
|
||||||
|
log.Debugw("not tracking enough peers to start sync worker", "have", len(sm.heads), "need", BootstrapPeerThreshold)
|
||||||
// not enough peers; track it and wait
|
// not enough peers; track it and wait
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user