From b9d03cf91b09b744caabb9db443f534b28b68026 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Thu, 20 Aug 2020 20:39:56 -0600 Subject: [PATCH] add default channel size --- libp2p/muxers/mplex/lpchannel.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libp2p/muxers/mplex/lpchannel.nim b/libp2p/muxers/mplex/lpchannel.nim index 48eadb97d..bf6bf6d9f 100644 --- a/libp2p/muxers/mplex/lpchannel.nim +++ b/libp2p/muxers/mplex/lpchannel.nim @@ -43,6 +43,10 @@ logScope: # more formal approach. # +const + # DefaultChannelSize* = 1024 * 1024 # 1MB + DefaultChannelSize* = 1024 # TODO: for debugging only + type LPChannel* = ref object of BufferStream id*: uint64 # channel id @@ -238,7 +242,7 @@ proc init*( conn: Connection, initiator: bool, name: string = "", - size: int = DefaultBufferSize, + size: int = DefaultChannelSize, lazy: bool = false, timeout: Duration = DefaultChanTimeout): LPChannel =