aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/mist/assets/examples/coin.html3
-rw-r--r--ui/qt/qwhisper/whisper.go2
-rw-r--r--whisper/filter.go2
-rw-r--r--whisper/whisper.go2
-rw-r--r--whisper/whisper_test.go2
-rw-r--r--xeth/whisper.go2
6 files changed, 7 insertions, 6 deletions
diff --git a/cmd/mist/assets/examples/coin.html b/cmd/mist/assets/examples/coin.html
index ed5063a05..1e8a1cad9 100644
--- a/cmd/mist/assets/examples/coin.html
+++ b/cmd/mist/assets/examples/coin.html
@@ -29,7 +29,8 @@
var web3 = require('web3');
var eth = web3.eth;
- web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080'));
+ web3.setProvider(new
+ web3.providers.HttpSyncProvider('http://localhost:8545'));
var desc = [{
"name": "balance(address)",
"type": "function",
diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go
index 98bfc69b0..2bc455b0b 100644
--- a/ui/qt/qwhisper/whisper.go
+++ b/ui/qt/qwhisper/whisper.go
@@ -106,7 +106,7 @@ func (self *Whisper) Messages(id int) (messages *ethutil.List) {
func filterFromMap(opts map[string]interface{}) (f whisper.Filter) {
if to, ok := opts["to"].(string); ok {
- f.To = crypto.ToECDSA(fromHex(to))
+ f.To = crypto.ToECDSAPub(fromHex(to))
}
if from, ok := opts["from"].(string); ok {
f.From = crypto.ToECDSAPub(fromHex(from))
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
},
diff --git a/xeth/whisper.go b/xeth/whisper.go
index 52f4593e4..8e3bcefd0 100644
--- a/xeth/whisper.go
+++ b/xeth/whisper.go
@@ -64,7 +64,7 @@ func (self *Whisper) HasIdentity(key string) bool {
func (self *Whisper) Watch(opts *Options) int {
filter := whisper.Filter{
- To: crypto.ToECDSA(fromHex(opts.To)),
+ To: crypto.ToECDSAPub(fromHex(opts.To)),
From: crypto.ToECDSAPub(fromHex(opts.From)),
Topics: whisper.TopicsFromString(opts.Topics...),
}