From c0e12e88dbdb1e5cb4ab03069d275e8eae7f1539 Mon Sep 17 00:00:00 2001 From: Xiang Fu Date: Mon, 8 Oct 2018 14:19:20 +0800 Subject: [PATCH] sync peer don`t need to wait for min connection setup (#541) --- p2pserver/p2pserver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/p2pserver/p2pserver.go b/p2pserver/p2pserver.go index f804b849c3..49faa28e06 100644 --- a/p2pserver/p2pserver.go +++ b/p2pserver/p2pserver.go @@ -333,6 +333,10 @@ func (this *P2PServer) connectSeeds() { //reachMinConnection return whether net layer have enough link under different config func (this *P2PServer) reachMinConnection() bool { + if config.DefConfig.Consensus.EnableConsensus == false { + //just sync + return true + } consensusType := strings.ToLower(config.DefConfig.Genesis.ConsensusType) if consensusType == "" { consensusType = "dbft"