diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-06 07:00:59 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-06 07:00:59 +0800 |
commit | e40c1c62ce0c2d9567066d84ea74fd24b424a81a (patch) | |
tree | 03fe0de4881f541a4a8dc2baae6a0da97ac8a7f7 /whisper | |
parent | 6b5f25802e73056702b743e0cab284cef49381ad (diff) | |
download | go-tangerine-e40c1c62ce0c2d9567066d84ea74fd24b424a81a.tar go-tangerine-e40c1c62ce0c2d9567066d84ea74fd24b424a81a.tar.gz go-tangerine-e40c1c62ce0c2d9567066d84ea74fd24b424a81a.tar.bz2 go-tangerine-e40c1c62ce0c2d9567066d84ea74fd24b424a81a.tar.lz go-tangerine-e40c1c62ce0c2d9567066d84ea74fd24b424a81a.tar.xz go-tangerine-e40c1c62ce0c2d9567066d84ea74fd24b424a81a.tar.zst go-tangerine-e40c1c62ce0c2d9567066d84ea74fd24b424a81a.zip |
API changed to use Pubkey only. Reflected that change in the rest of the api
Diffstat (limited to 'whisper')
-rw-r--r-- | whisper/filter.go | 2 | ||||
-rw-r--r-- | whisper/whisper.go | 2 | ||||
-rw-r--r-- | whisper/whisper_test.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/whisper/filter.go b/whisper/filter.go index 4315aa556..b33f2c1a2 100644 --- a/whisper/filter.go +++ b/whisper/filter.go @@ -3,7 +3,7 @@ package whisper import "crypto/ecdsa" type Filter struct { - To *ecdsa.PrivateKey + To *ecdsa.PublicKey From *ecdsa.PublicKey Topics [][]byte Fn func(*Message) diff --git a/whisper/whisper.go b/whisper/whisper.go index cc0348422..57c898303 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -118,7 +118,7 @@ func (self *Whisper) GetIdentity(key *ecdsa.PublicKey) *ecdsa.PrivateKey { func (self *Whisper) Watch(opts Filter) int { return self.filters.Install(filter.Generic{ - Str1: string(crypto.FromECDSA(opts.To)), + Str1: string(crypto.FromECDSAPub(opts.To)), Str2: string(crypto.FromECDSAPub(opts.From)), Data: bytesToMap(opts.Topics), Fn: func(data interface{}) { diff --git a/whisper/whisper_test.go b/whisper/whisper_test.go index c5ad73021..3e3945a0a 100644 --- a/whisper/whisper_test.go +++ b/whisper/whisper_test.go @@ -11,7 +11,7 @@ func TestEvent(t *testing.T) { whisper := New() id := whisper.NewIdentity() whisper.Watch(Filter{ - To: id, + To: &id.PublicKey, Fn: func(msg *Message) { res <- msg }, |