diff --git a/build/params_mainnet.go b/build/params_mainnet.go index 425d23ac1..3d8f5e374 100644 --- a/build/params_mainnet.go +++ b/build/params_mainnet.go @@ -59,4 +59,5 @@ const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds) const PropagationDelaySecs = uint64(6) +// BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start const BootstrapPeerThreshold = 4 diff --git a/chain/sync_manager.go b/chain/sync_manager.go index 3b1b54e51..685e05df6 100644 --- a/chain/sync_manager.go +++ b/chain/sync_manager.go @@ -203,6 +203,7 @@ func (sm *syncManager) handlePeerHead(head peerHead) { // not yet; do we have enough peers? 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 return }