diff --git a/pkg/p2p/peer/peer.go b/pkg/p2p/peer/peer.go index 4499af1998..3e63e36f8c 100644 --- a/pkg/p2p/peer/peer.go +++ b/pkg/p2p/peer/peer.go @@ -13,6 +13,11 @@ const ( chSizeInLightMode = defaultChSize * 2 ) +const ( + parentChSize = 10000 + parentChSizeInLightMode = parentChSize * 2 +) + type Remote struct { ToCh chan []byte FromCh chan *bytebufferpool.ByteBuffer @@ -34,10 +39,10 @@ type Parent struct { } func NewParent(enableLightNode bool) Parent { - messageChSize := defaultChSize + messageChSize := parentChSize if enableLightNode { // because in light node we send block and snapshot request messages - messageChSize = chSizeInLightMode + messageChSize = parentChSizeInLightMode } return Parent{ MessageCh: make(chan ProtoMessage, messageChSize),