From e8489549573d249fc0606170ea08211d6bc81b1c Mon Sep 17 00:00:00 2001 From: sukun Date: Wed, 3 Jul 2024 14:09:09 +0530 Subject: [PATCH] peerstore: reduce default protocol limit to 128 --- p2p/host/peerstore/pstoreds/protobook.go | 2 +- p2p/host/peerstore/pstoremem/protobook.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p/host/peerstore/pstoreds/protobook.go b/p2p/host/peerstore/pstoreds/protobook.go index 40fa7d951b..9ef7d1c9fa 100644 --- a/p2p/host/peerstore/pstoreds/protobook.go +++ b/p2p/host/peerstore/pstoreds/protobook.go @@ -48,7 +48,7 @@ func NewProtoBook(meta pstore.PeerMetadata, opts ...ProtoBookOption) (*dsProtoBo } return ret }(), - maxProtos: 1024, + maxProtos: 128, } for _, opt := range opts { diff --git a/p2p/host/peerstore/pstoremem/protobook.go b/p2p/host/peerstore/pstoremem/protobook.go index e5bfae14f2..283dd105f9 100644 --- a/p2p/host/peerstore/pstoremem/protobook.go +++ b/p2p/host/peerstore/pstoremem/protobook.go @@ -51,7 +51,7 @@ func NewProtoBook(opts ...ProtoBookOption) (*memoryProtoBook, error) { } return ret }(), - maxProtos: 1024, + maxProtos: 128, } for _, opt := range opts {