whisper: polish the messages, fix some bugs, tests

Bugs fixed:
  - Use randomly generated flags as the spec required.
  - During envelope opening check the first bit only for signature.
This commit is contained in:
Péter Szilágyi
2015-04-10 15:53:21 +03:00
parent 7e54a9c07f
commit 7d8ce53eca
6 changed files with 213 additions and 92 deletions

View File

@@ -28,7 +28,9 @@ type MessageEvent struct {
Message *Message
}
const DefaultTtl = 50 * time.Second
const (
DefaultTimeToLive = 50 * time.Second
)
type Whisper struct {
protocol p2p.Protocol