From 0a0a936d4dd155aa511b57defeee873a036285df Mon Sep 17 00:00:00 2001 From: gop Date: Thu, 5 Sep 2024 12:14:42 -0500 Subject: [PATCH] Chaged the GossipSub max message size to 3MB --- p2p/node/pubsubManager/gossipsub.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/p2p/node/pubsubManager/gossipsub.go b/p2p/node/pubsubManager/gossipsub.go index 65a5d27d57..39e2501b75 100644 --- a/p2p/node/pubsubManager/gossipsub.go +++ b/p2p/node/pubsubManager/gossipsub.go @@ -46,7 +46,8 @@ func NewGossipSubManager(ctx context.Context, h host.Host) (*PubsubManager, erro cfg.Dlo = 6 cfg.Dhi = 45 cfg.Dout = 20 - ps, err := pubsub.NewGossipSub(ctx, h, pubsub.WithGossipSubParams(cfg)) + MaxSize := 3 << 20 + ps, err := pubsub.NewGossipSub(ctx, h, pubsub.WithGossipSubParams(cfg), pubsub.WithMaxMessageSize(MaxSize)) if err != nil { return nil, err }