From b2a225a52e45315f3ec90e11707fefa6059d13f5 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 23 Feb 2015 15:43:41 +0100 Subject: 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 --- whisper/whisper.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'whisper/whisper.go') 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 { -- cgit