From ae4bfc3cfb3f1debad9dd0211950ce09038ffa90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 21 Apr 2015 18:31:08 +0300 Subject: rpc, ui/qt/qwhisper, whisper, xeth: introduce complex topic filters --- xeth/whisper.go | 4 ++-- xeth/xeth.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'xeth') diff --git a/xeth/whisper.go b/xeth/whisper.go index 386897f39..25c4af3b1 100644 --- a/xeth/whisper.go +++ b/xeth/whisper.go @@ -67,11 +67,11 @@ func (self *Whisper) Post(payload string, to, from string, topics []string, prio // Watch installs a new message handler to run in case a matching packet arrives // from the whisper network. -func (self *Whisper) Watch(to, from string, topics []string, fn func(WhisperMessage)) int { +func (self *Whisper) Watch(to, from string, topics [][]string, fn func(WhisperMessage)) int { filter := whisper.Filter{ To: crypto.ToECDSAPub(common.FromHex(to)), From: crypto.ToECDSAPub(common.FromHex(from)), - Topics: whisper.NewTopicsFromStrings(topics...), + Topics: whisper.NewTopicFilterFromStrings(topics...), } filter.Fn = func(message *whisper.Message) { fn(NewWhisperMessage(message)) diff --git a/xeth/xeth.go b/xeth/xeth.go index 8cc32c958..ea6ae9950 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -452,7 +452,7 @@ func (self *XEth) AllLogs(earliest, latest int64, skip, max int, address []strin return filter.Find() } -func (p *XEth) NewWhisperFilter(to, from string, topics []string) int { +func (p *XEth) NewWhisperFilter(to, from string, topics [][]string) int { var id int callback := func(msg WhisperMessage) { p.messagesMut.Lock() -- cgit v1.2.3