diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-04-28 16:54:05 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-04-28 16:54:05 +0800 |
commit | a05c420371aa56657b86ba3dce6ebb087adb708d (patch) | |
tree | 3e0853dcff756c503764d0f73c1757c585be2aa9 /whisper/message_test.go | |
parent | 182d484aa70bcd5b22117f02333b1fd3b1535dcb (diff) | |
parent | 978ffd3097242a5faeb7b23b9c72590170004dc6 (diff) | |
download | dexon-a05c420371aa56657b86ba3dce6ebb087adb708d.tar dexon-a05c420371aa56657b86ba3dce6ebb087adb708d.tar.gz dexon-a05c420371aa56657b86ba3dce6ebb087adb708d.tar.bz2 dexon-a05c420371aa56657b86ba3dce6ebb087adb708d.tar.lz dexon-a05c420371aa56657b86ba3dce6ebb087adb708d.tar.xz dexon-a05c420371aa56657b86ba3dce6ebb087adb708d.tar.zst dexon-a05c420371aa56657b86ba3dce6ebb087adb708d.zip |
Merge pull request #738 from karalabe/whisper-cleanup
Whisper cleanup, part 3
Diffstat (limited to 'whisper/message_test.go')
-rw-r--r-- | whisper/message_test.go | 4 |
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. |