aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisper.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-13 17:16:51 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-13 17:16:51 +0800
commit9a53390f49b9667db162bf2ef487d0af64b3363d (patch)
treeb71d2daee37a56a7872d5d3c1536ed83a39d7bc2 /whisper/whisper.go
parent7b501906db5b4bed0cf9972a1b103cc343d7f2d2 (diff)
downloadgo-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.gz
go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.zst
go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.zip
whisper: clean up and integrate topics
Diffstat (limited to 'whisper/whisper.go')
-rw-r--r--whisper/whisper.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/whisper/whisper.go b/whisper/whisper.go
index ad29fe16a..d9affe09b 100644
--- a/whisper/whisper.go
+++ b/whisper/whisper.go
@@ -119,7 +119,7 @@ func (self *Whisper) Watch(opts Filter) int {
return self.filters.Install(filter.Generic{
Str1: string(crypto.FromECDSAPub(opts.To)),
Str2: string(crypto.FromECDSAPub(opts.From)),
- Data: bytesToMap(opts.Topics),
+ Data: NewTopicSet(opts.Topics),
Fn: func(data interface{}) {
opts.Fn(data.(*Message))
},
@@ -272,9 +272,9 @@ func (self *Whisper) Protocol() p2p.Protocol {
return self.protocol
}
-func createFilter(message *Message, topics [][]byte, key *ecdsa.PrivateKey) filter.Filter {
+func createFilter(message *Message, topics []Topic, key *ecdsa.PrivateKey) filter.Filter {
return filter.Generic{
Str1: string(crypto.FromECDSAPub(&key.PublicKey)), Str2: string(crypto.FromECDSAPub(message.Recover())),
- Data: bytesToMap(topics),
+ Data: NewTopicSet(topics),
}
}