diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2018-01-30 16:55:08 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-30 16:55:08 +0800 |
commit | a9e4a90d57d3c072fb727ee62b71002325e23934 (patch) | |
tree | 45b0cd4885ebfb562fe0dbeb8b8b9d6859875401 /whisper/whisperv6/doc.go | |
parent | 59a852e4188e18e587b6d54f646a6780f4d1f12c (diff) | |
download | dexon-a9e4a90d57d3c072fb727ee62b71002325e23934.tar.gz dexon-a9e4a90d57d3c072fb727ee62b71002325e23934.tar.zst dexon-a9e4a90d57d3c072fb727ee62b71002325e23934.zip |
whisper: change the whisper message format so as to add the payload size (#15870)
* whisper: message format changed
* whisper: tests fixed
* whisper: style fixes
* whisper: fixed names, fixed failing tests
* whisper: fix merge issue in #15870
Occured while using the github online merge tool. Lesson learned.
* whisper: fix a gofmt error for #15870
Diffstat (limited to 'whisper/whisperv6/doc.go')
-rw-r--r-- | whisper/whisperv6/doc.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/whisper/whisperv6/doc.go b/whisper/whisperv6/doc.go index 699fd5c76..d5d7fed60 100644 --- a/whisper/whisperv6/doc.go +++ b/whisper/whisperv6/doc.go @@ -52,15 +52,16 @@ const ( p2pMessageCode = 127 // peer-to-peer message (to be consumed by the peer, but not forwarded any further) NumberOfMessageCodes = 128 - paddingMask = byte(3) + SizeMask = byte(3) // mask used to extract the size of payload size field from the flags signatureFlag = byte(4) TopicLength = 4 // in bytes signatureLength = 65 // in bytes aesKeyLength = 32 // in bytes - AESNonceLength = 12 // in bytes + aesNonceLength = 12 // in bytes; for more info please see cipher.gcmStandardNonceSize & aesgcm.NonceSize() keyIDSize = 32 // in bytes bloomFilterSize = 64 // in bytes + flagsLength = 1 EnvelopeHeaderLength = 20 @@ -68,7 +69,7 @@ const ( DefaultMaxMessageSize = uint32(1024 * 1024) DefaultMinimumPoW = 0.2 - padSizeLimit = 256 // just an arbitrary number, could be changed without breaking the protocol (must not exceed 2^24) + padSizeLimit = 256 // just an arbitrary number, could be changed without breaking the protocol messageQueueLimit = 1024 expirationCycle = time.Second |