From 9a53390f49b9667db162bf2ef487d0af64b3363d Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Mon, 13 Apr 2015 12:16:51 +0300 Subject: whisper: clean up and integrate topics --- whisper/whisper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'whisper/whisper.go') 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), } } -- cgit