From 805d07bca6f29f6fc4b1067a14f41b4ef501496b Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 4 May 2020 19:04:24 +0300 Subject: [PATCH] turn off the mesh in bootstrappers --- node/modules/lp2p/pubsub.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/node/modules/lp2p/pubsub.go b/node/modules/lp2p/pubsub.go index 805f3372d..15fb39486 100644 --- a/node/modules/lp2p/pubsub.go +++ b/node/modules/lp2p/pubsub.go @@ -146,6 +146,14 @@ func GossipSub(cfg *config.Pubsub) interface{} { // enable Peer eXchange on bootstrappers if isBootstrapNode { + // turn off the mesh in bootstrappers -- only do gossip and PX + pubsub.GossipSubD = 0 + pubsub.GossipSubDscore = 0 + pubsub.GossipSubDlo = 0 + pubsub.GossipSubDhi = 0 + pubsub.GossipSubDlazy = 1024 + pubsub.GossipSubGossipFactor = 0.5 + // turn on PX options = append(options, pubsub.WithPeerExchange(true)) }