diff options
Diffstat (limited to 'whisper/envelope_test.go')
-rw-r--r-- | whisper/envelope_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/whisper/envelope_test.go b/whisper/envelope_test.go index ed1f08365..3117284f1 100644 --- a/whisper/envelope_test.go +++ b/whisper/envelope_test.go @@ -3,6 +3,7 @@ package whisper import ( "bytes" "testing" + "time" ) func TestEnvelopeOpen(t *testing.T) { @@ -26,9 +27,12 @@ func TestEnvelopeOpen(t *testing.T) { if bytes.Compare(opened.Payload, message.Payload) != 0 { t.Fatalf("payload mismatch: have 0x%x, want 0x%x", opened.Payload, message.Payload) } - if opened.Sent != message.Sent { + if opened.Sent.Unix() != message.Sent.Unix() { t.Fatalf("send time mismatch: have %d, want %d", opened.Sent, message.Sent) } + if opened.TTL/time.Second != DefaultTTL/time.Second { + t.Fatalf("message TTL mismatch: have %v, want %v", opened.TTL, DefaultTTL) + } if opened.Hash != envelope.Hash() { t.Fatalf("message hash mismatch: have 0x%x, want 0x%x", opened.Hash, envelope.Hash()) |