cs: clarify where 24 comes from in maxMsgSizeBytes (wal.go)

This commit is contained in:
Anton Kaliaev
2019-11-20 13:13:44 +04:00
parent d5ed8a794b
commit 43aed989ac

View File

@@ -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