diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2017-02-23 16:41:47 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-02-23 16:41:47 +0800 |
commit | 29fac7de448c85049a97cbec3dc0819122bd2cb0 (patch) | |
tree | eaa56d55f2ff5c15fca84a6d408d6aaff7d78404 /whisper/whisperv5/peer_test.go | |
parent | 555273495b413069e9422b04aa46251146c752b2 (diff) | |
download | go-tangerine-29fac7de448c85049a97cbec3dc0819122bd2cb0.tar go-tangerine-29fac7de448c85049a97cbec3dc0819122bd2cb0.tar.gz go-tangerine-29fac7de448c85049a97cbec3dc0819122bd2cb0.tar.bz2 go-tangerine-29fac7de448c85049a97cbec3dc0819122bd2cb0.tar.lz go-tangerine-29fac7de448c85049a97cbec3dc0819122bd2cb0.tar.xz go-tangerine-29fac7de448c85049a97cbec3dc0819122bd2cb0.tar.zst go-tangerine-29fac7de448c85049a97cbec3dc0819122bd2cb0.zip |
Whisper API fixed (#3687)
* whisper: wnode updated for tests with geth
* whisper: updated processing of incoming messages
* whisper: symmetric encryption updated
* whisper: filter id type changed to enhance security
* whisper: allow filter without topic for asymmetric encryption
* whisper: POW updated
* whisper: logging updated
* whisper: spellchecker update
* whisper: error handling changed
* whisper: JSON field names fixed
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() |