diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-03-23 16:22:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-23 16:22:56 +0800 |
commit | 3fa0fa713bc1508835bdecd7dea78ff09803e327 (patch) | |
tree | 6a5d4a7dcfd72489bd4f7df70f5188a636947c24 /whisper/whisperv5/whisper_test.go | |
parent | 525116dbff916825463931361f75e75e955c12e2 (diff) | |
parent | f1534f5797664856218c8347366488f37f1e7924 (diff) | |
download | dexon-3fa0fa713bc1508835bdecd7dea78ff09803e327.tar dexon-3fa0fa713bc1508835bdecd7dea78ff09803e327.tar.gz dexon-3fa0fa713bc1508835bdecd7dea78ff09803e327.tar.bz2 dexon-3fa0fa713bc1508835bdecd7dea78ff09803e327.tar.lz dexon-3fa0fa713bc1508835bdecd7dea78ff09803e327.tar.xz dexon-3fa0fa713bc1508835bdecd7dea78ff09803e327.tar.zst dexon-3fa0fa713bc1508835bdecd7dea78ff09803e327.zip |
Merge pull request #3809 from fjl/all-use-normal-context
all: import "context" instead of "golang.org/x/net/context"
Diffstat (limited to 'whisper/whisperv5/whisper_test.go')
-rw-r--r-- | whisper/whisperv5/whisper_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/whisper/whisperv5/whisper_test.go b/whisper/whisperv5/whisper_test.go index 312dacfc4..8d63d443c 100644 --- a/whisper/whisperv5/whisper_test.go +++ b/whisper/whisperv5/whisper_test.go @@ -18,6 +18,7 @@ package whisperv5 import ( "bytes" + mrand "math/rand" "testing" "time" @@ -49,7 +50,7 @@ func TestWhisperBasic(t *testing.T) { } peerID := make([]byte, 64) - randomize(peerID) + mrand.Read(peerID) peer, _ := w.getPeer(peerID) if peer != nil { t.Fatal("found peer for random key.") @@ -212,7 +213,7 @@ func TestWhisperSymKeyManagement(t *testing.T) { // add existing id, nothing should change randomKey := make([]byte, 16) - randomize(randomKey) + mrand.Read(randomKey) err = w.AddSymKey(id1, randomKey) if err == nil { t.Fatalf("failed AddSymKey with seed %d.", seed) |