From a522a5a53249703f8588eedf255caaf630e022f3 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Sat, 6 Dec 2014 11:27:08 -0500 Subject: [PATCH] conn: larger max message. With the new msgio, we no longer need to bound message sizes for the sake of buffers. MaxMessageSize should remain though in order to prevent streaming of huge things. In general, messages shouldn't be above one MB. This max is now set to 4MB. If a block happens to be larger, we should split it up. --- net/conn/conn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/conn/conn.go b/net/conn/conn.go index ba9a9c570..e79e8283d 100644 --- a/net/conn/conn.go +++ b/net/conn/conn.go @@ -21,8 +21,8 @@ const ( // ChanBuffer is the size of the buffer in the Conn Chan ChanBuffer = 10 - // MaxMessageSize is the size of the largest single message - MaxMessageSize = 1 << 20 + // MaxMessageSize is the size of the largest single message. (4MB) + MaxMessageSize = 1 << 22 // HandshakeTimeout for when nodes first connect HandshakeTimeout = time.Second * 5