diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-10 20:53:21 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-10 20:53:21 +0800 |
commit | 7d8ce53eca90a6e93e49d584a2cff5e39aea40c0 (patch) | |
tree | 1f42e76be9c66a55407741aa15aa659fdf408850 /whisper/whisper_test.go | |
parent | 7e54a9c07f10ff16aabfe8bd3944c9309d4efc06 (diff) | |
download | go-tangerine-7d8ce53eca90a6e93e49d584a2cff5e39aea40c0.tar go-tangerine-7d8ce53eca90a6e93e49d584a2cff5e39aea40c0.tar.gz go-tangerine-7d8ce53eca90a6e93e49d584a2cff5e39aea40c0.tar.bz2 go-tangerine-7d8ce53eca90a6e93e49d584a2cff5e39aea40c0.tar.lz go-tangerine-7d8ce53eca90a6e93e49d584a2cff5e39aea40c0.tar.xz go-tangerine-7d8ce53eca90a6e93e49d584a2cff5e39aea40c0.tar.zst go-tangerine-7d8ce53eca90a6e93e49d584a2cff5e39aea40c0.zip |
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.
Diffstat (limited to 'whisper/whisper_test.go')
-rw-r--r-- | whisper/whisper_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/whisper/whisper_test.go b/whisper/whisper_test.go index 3e3945a0a..a3e0e03d2 100644 --- a/whisper/whisper_test.go +++ b/whisper/whisper_test.go @@ -18,8 +18,8 @@ func TestEvent(t *testing.T) { }) msg := NewMessage([]byte(fmt.Sprintf("Hello world. This is whisper-go. Incase you're wondering; the time is %v", time.Now()))) - envelope, err := msg.Seal(DefaultPow, Opts{ - Ttl: DefaultTtl, + envelope, err := msg.Wrap(DefaultPow, Options{ + TTL: DefaultTimeToLive, From: id, To: &id.PublicKey, }) |