diff --git a/whisper/whisperv6/doc.go b/whisper/whisperv6/doc.go index 040e1b0dfc..da1b4ee5ba 100644 --- a/whisper/whisperv6/doc.go +++ b/whisper/whisperv6/doc.go @@ -58,6 +58,8 @@ const ( keyIdSize = 32 // in bytes bloomFilterSize = 64 // in bytes + EnvelopeHeaderLength = 20 + MaxMessageSize = uint32(10 * 1024 * 1024) // maximum accepted size of a message. DefaultMaxMessageSize = uint32(1024 * 1024) DefaultMinimumPoW = 0.2 diff --git a/whisper/whisperv6/envelope.go b/whisper/whisperv6/envelope.go index 304608fdeb..9ed712b934 100644 --- a/whisper/whisperv6/envelope.go +++ b/whisper/whisperv6/envelope.go @@ -51,7 +51,6 @@ type Envelope struct { // size returns the size of envelope as it is sent (i.e. public fields only) func (e *Envelope) size() int { - const EnvelopeHeaderLength = 20 return EnvelopeHeaderLength + len(e.Data) }