aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisper.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-23 22:43:41 +0800
committerobscuren <geffobscura@gmail.com>2015-02-23 22:43:41 +0800
commitb2a225a52e45315f3ec90e11707fefa6059d13f5 (patch)
tree7019227fc4af5e39f88bcc58ddc455826df8d569 /whisper/whisper.go
parent20aa6dde067a0c8d28fdafd43e41f996f014e8b0 (diff)
downloaddexon-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar
dexon-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.gz
dexon-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.bz2
dexon-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.lz
dexon-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.xz
dexon-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.zst
dexon-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/whisper.go')
-rw-r--r--whisper/whisper.go4
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 {