diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-23 22:43:41 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-23 22:43:41 +0800 |
commit | b2a225a52e45315f3ec90e11707fefa6059d13f5 (patch) | |
tree | 7019227fc4af5e39f88bcc58ddc455826df8d569 /whisper | |
parent | 20aa6dde067a0c8d28fdafd43e41f996f014e8b0 (diff) | |
download | go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.gz go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.zst go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.zip |
Properly uninstall filters. Mining issue fixed #closes #365
* Added an additional tx state which is used to get the current nonce
* Refresh transient state each time a new canonical block is found
* Properly uninstall filters. Fixes a possible crash in RPC
Diffstat (limited to 'whisper')
-rw-r--r-- | whisper/whisper.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/whisper/whisper.go b/whisper/whisper.go index 50c2f98fd..13209f9a6 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -127,6 +127,10 @@ func (self *Whisper) Watch(opts Filter) int { }) } +func (self *Whisper) Unwatch(id int) { + self.filters.Uninstall(id) +} + func (self *Whisper) Messages(id int) (messages []*Message) { filter := self.filters.Get(id) if filter != nil { |