From 7f48eb8737878e352a65475382532db26f9fbc52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 21 Apr 2015 11:43:11 +0300 Subject: whisper, xeth/whisper: surface TTL and hash to the API --- whisper/message_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'whisper/message_test.go') 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. -- cgit v1.2.3