Skip to content

Commit

Permalink
sync peer don`t need to wait for min connection setup (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiang Fu authored and laizy committed Oct 8, 2018
1 parent 59ca8ef commit c0e12e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions p2pserver/p2pserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c0e12e8

Please sign in to comment.