aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/whisper.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-16 18:27:38 +0800
committerobscuren <geffobscura@gmail.com>2015-03-16 18:27:38 +0800
commitb5234413611ce5984292f85a01de1f56c045b490 (patch)
treee6e0c6f7fe8358a2dc63cdea11ac66b4f59397f5 /xeth/whisper.go
parent0b8f66ed9ef177dc72442dd7ba337c6733e30344 (diff)
downloadgo-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.gz
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.bz2
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.lz
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.xz
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.zst
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.zip
Moved ethutil => common
Diffstat (limited to 'xeth/whisper.go')
-rw-r--r--xeth/whisper.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/xeth/whisper.go b/xeth/whisper.go
index f5c26faae..76bf8012a 100644
--- a/xeth/whisper.go
+++ b/xeth/whisper.go
@@ -5,7 +5,7 @@ import (
"time"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/whisper"
)
@@ -29,12 +29,12 @@ func (self *Whisper) Post(payload string, to, from string, topics []string, prio
ttl = 100
}
- pk := crypto.ToECDSAPub(ethutil.FromHex(from))
+ pk := crypto.ToECDSAPub(common.FromHex(from))
if key := self.Whisper.GetIdentity(pk); key != nil || len(from) == 0 {
- msg := whisper.NewMessage(ethutil.FromHex(payload))
+ msg := whisper.NewMessage(common.FromHex(payload))
envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{
Ttl: time.Duration(ttl) * time.Second,
- To: crypto.ToECDSAPub(ethutil.FromHex(to)),
+ To: crypto.ToECDSAPub(common.FromHex(to)),
From: key,
Topics: whisper.TopicsFromString(topics...),
})
@@ -60,13 +60,13 @@ func (self *Whisper) NewIdentity() string {
}
func (self *Whisper) HasIdentity(key string) bool {
- return self.Whisper.HasIdentity(crypto.ToECDSAPub(ethutil.FromHex(key)))
+ return self.Whisper.HasIdentity(crypto.ToECDSAPub(common.FromHex(key)))
}
func (self *Whisper) Watch(opts *Options) int {
filter := whisper.Filter{
- To: crypto.ToECDSAPub(ethutil.FromHex(opts.To)),
- From: crypto.ToECDSAPub(ethutil.FromHex(opts.From)),
+ To: crypto.ToECDSAPub(common.FromHex(opts.To)),
+ From: crypto.ToECDSAPub(common.FromHex(opts.From)),
Topics: whisper.TopicsFromString(opts.Topics...),
}