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.gz
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...),
}
streamer&id=e2d2adda451a20319a37159e06ca995a54c01154'>- Update to version 1.36.alepulver2009-09-0918-2226/+323 * Bump PORTREVISION after libogg and libvorbisfile major version increment.naddy2009-07-071-1/+1 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-2/+2 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-221-2/+2 * - Chase devel/sdl12 shlib version bumpmiwi2008-03-131-1/+1 * - Remove supression of the bot log file (now it's stored in the home directory,alepulver2008-01-122-12/+1 * - Fix building when MP3 option is disabled.alepulver2007-09-291-15/+23 * - Add CELLSHADING and MP3 options (patches from official site).alepulver2007-09-155-18/+1769 * - Bump PORTREVISION.alepulver2007-09-124-34/+16 * - Chase increase of audio/libvorbis shlib version.miwi2007-07-281-2/+2 * - Welcome X.org 7.2 \o/.flz2007-05-201-0/+1 * - Fix SMP option when CLIENT is not selected.alepulver2006-12-261-19/+22 * - Update to version 1.34-rc3.alepulver2006-12-192-14/+4 * - Make fetchable (icculus.org/quake3 -> ioquake3.org), also update WWW line.alepulver2006-11-222-2/+2 * - Update to version 1.34-rc2.alepulver2006-11-093-49/+51 * - Update devel/sdl12 to version 1.2.11. Now we employ stock SDL directorystas2006-09-201-0/+1 * - Update to version 1.33 (SVN rev 797).alepulver2006-06-129-32/+47