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/whisper.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/whisper.go')
-rw-r--r-- | whisper/whisperv5/whisper.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/whisper/whisperv5/whisper.go b/whisper/whisperv5/whisper.go index a027fd84b..2a6ff5f40 100644 --- a/whisper/whisperv5/whisper.go +++ b/whisper/whisperv5/whisper.go @@ -272,16 +272,16 @@ func (w *Whisper) GetSymKey(name string) []byte { // Watch installs a new message handler to run in case a matching packet arrives // from the whisper network. -func (w *Whisper) Watch(f *Filter) uint32 { +func (w *Whisper) Watch(f *Filter) (string, error) { return w.filters.Install(f) } -func (w *Whisper) GetFilter(id uint32) *Filter { +func (w *Whisper) GetFilter(id string) *Filter { return w.filters.Get(id) } // Unwatch removes an installed message handler. -func (w *Whisper) Unwatch(id uint32) { +func (w *Whisper) Unwatch(id string) { w.filters.Uninstall(id) } @@ -575,7 +575,7 @@ func (w *Whisper) Envelopes() []*Envelope { } // Messages retrieves all the decrypted messages matching a filter id. -func (w *Whisper) Messages(id uint32) []*ReceivedMessage { +func (w *Whisper) Messages(id string) []*ReceivedMessage { result := make([]*ReceivedMessage, 0) w.poolMu.RLock() defer w.poolMu.RUnlock() |