aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/message_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-21 16:43:11 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-28 15:49:04 +0800
commit7f48eb8737878e352a65475382532db26f9fbc52 (patch)
tree7db869690505978a4f111b996e7357572f64211c /whisper/message_test.go
parent19bc4624eaefc2c8201260e7afa1a5893159bffc (diff)
downloaddexon-7f48eb8737878e352a65475382532db26f9fbc52.tar
dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.gz
dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.bz2
dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.lz
dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.xz
dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.zst
dexon-7f48eb8737878e352a65475382532db26f9fbc52.zip
whisper, xeth/whisper: surface TTL and hash to the API
Diffstat (limited to 'whisper/message_test.go')
-rw-r--r--whisper/message_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/whisper/message_test.go b/whisper/message_test.go
index 18a254e5c..0b4a24c24 100644
--- a/whisper/message_test.go
+++ b/whisper/message_test.go
@@ -4,6 +4,7 @@ import (
"bytes"
"crypto/elliptic"
"testing"
+ "time"
"github.com/ethereum/go-ethereum/crypto"
)
@@ -25,6 +26,9 @@ func TestMessageSimpleWrap(t *testing.T) {
if bytes.Compare(msg.Payload, payload) != 0 {
t.Fatalf("payload mismatch after wrapping: have 0x%x, want 0x%x", msg.Payload, payload)
}
+ if msg.TTL/time.Second != DefaultTTL/time.Second {
+ t.Fatalf("message TTL mismatch: have %v, want %v", msg.TTL, DefaultTTL)
+ }
}
// Tests whether a message can be signed, and wrapped in plain-text.