From 43aed989ace1495fc4a3902c0f24e6716e659e5a Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 20 Nov 2019 13:13:44 +0400 Subject: [PATCH] cs: clarify where 24 comes from in maxMsgSizeBytes (wal.go) --- consensus/wal.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/consensus/wal.go b/consensus/wal.go index 166c95d9e..bb1252272 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -20,7 +20,10 @@ import ( const ( // amino overhead + time.Time + max consensus msg size - // TODO: Can we clarify better where 24 comes from precisely? + // + // q: where 24 bytes are coming from? + // a: cdc.MustMarshalBinaryBare(empty consensus part msg) = 14 bytes. +10 + // bytes just in case amino will require more space in the future. maxMsgSizeBytes = maxMsgSize + 24 // how often the WAL should be sync'd during period sync'ing