diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-13 17:16:51 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-13 17:16:51 +0800 |
commit | 9a53390f49b9667db162bf2ef487d0af64b3363d (patch) | |
tree | b71d2daee37a56a7872d5d3c1536ed83a39d7bc2 /whisper/whisper.go | |
parent | 7b501906db5b4bed0cf9972a1b103cc343d7f2d2 (diff) | |
download | dexon-9a53390f49b9667db162bf2ef487d0af64b3363d.tar dexon-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.gz dexon-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.bz2 dexon-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.lz dexon-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.xz dexon-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.zst dexon-9a53390f49b9667db162bf2ef487d0af64b3363d.zip |
whisper: clean up and integrate topics
Diffstat (limited to 'whisper/whisper.go')
-rw-r--r-- | whisper/whisper.go | 6 |
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), } } |