aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/whisper.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-21 23:31:08 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-28 15:49:04 +0800
commitae4bfc3cfb3f1debad9dd0211950ce09038ffa90 (patch)
treed09f6c0291eab1b02cc1145b816542024e7c4bfa /xeth/whisper.go
parent15586368e52f49a0f7ea28f890af49d196760846 (diff)
downloadgo-tangerine-ae4bfc3cfb3f1debad9dd0211950ce09038ffa90.tar
go-tangerine-ae4bfc3cfb3f1debad9dd0211950ce09038ffa90.tar.gz
go-tangerine-ae4bfc3cfb3f1debad9dd0211950ce09038ffa90.tar.bz2
go-tangerine-ae4bfc3cfb3f1debad9dd0211950ce09038ffa90.tar.lz
go-tangerine-ae4bfc3cfb3f1debad9dd0211950ce09038ffa90.tar.xz
go-tangerine-ae4bfc3cfb3f1debad9dd0211950ce09038ffa90.tar.zst
go-tangerine-ae4bfc3cfb3f1debad9dd0211950ce09038ffa90.zip
rpc, ui/qt/qwhisper, whisper, xeth: introduce complex topic filters
Diffstat (limited to 'xeth/whisper.go')
-rw-r--r--xeth/whisper.go4
1 files changed, 2 insertions, 2 deletions
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))