diff options
Diffstat (limited to 'whisper/whisperv5/peer_test.go')
-rw-r--r-- | whisper/whisperv5/peer_test.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/whisper/whisperv5/peer_test.go b/whisper/whisperv5/peer_test.go index cc98ba2d6..cce2c92ba 100644 --- a/whisper/whisperv5/peer_test.go +++ b/whisper/whisperv5/peer_test.go @@ -79,7 +79,7 @@ type TestNode struct { shh *Whisper id *ecdsa.PrivateKey server *p2p.Server - filerId uint32 + filerId string } var result TestData @@ -122,7 +122,10 @@ func initialize(t *testing.T) { topics := make([]TopicType, 0) topics = append(topics, sharedTopic) f := Filter{KeySym: sharedKey, Topics: topics} - node.filerId = node.shh.Watch(&f) + node.filerId, err = node.shh.Watch(&f) + if err != nil { + t.Fatalf("failed to install the filter: %s.", err) + } node.id, err = crypto.HexToECDSA(keys[i]) if err != nil { t.Fatalf("failed convert the key: %s.", keys[i]) @@ -187,7 +190,7 @@ func checkPropagation(t *testing.T) { for i := 0; i < NumNodes; i++ { f := nodes[i].shh.GetFilter(nodes[i].filerId) if f == nil { - t.Fatalf("failed to get filterId %d from node %d.", nodes[i].filerId, i) + t.Fatalf("failed to get filterId %s from node %d.", nodes[i].filerId, i) } mail := f.Retrieve() |