aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-02 17:27:20 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-02 17:27:20 +0800
commit75f41dedcab63e23ab9c58dcda3da02e3dbb29cb (patch)
treed3900442c98526fdb05c36ee7e3a226cffc5104e /xeth/xeth.go
parent5caff3bc247cdd71f2342093d276041afe898ab3 (diff)
parent529fb7a7d76e4c98f825bfcb9f3c1fb40b1d0d1e (diff)
downloaddexon-75f41dedcab63e23ab9c58dcda3da02e3dbb29cb.tar
dexon-75f41dedcab63e23ab9c58dcda3da02e3dbb29cb.tar.gz
dexon-75f41dedcab63e23ab9c58dcda3da02e3dbb29cb.tar.bz2
dexon-75f41dedcab63e23ab9c58dcda3da02e3dbb29cb.tar.lz
dexon-75f41dedcab63e23ab9c58dcda3da02e3dbb29cb.tar.xz
dexon-75f41dedcab63e23ab9c58dcda3da02e3dbb29cb.tar.zst
dexon-75f41dedcab63e23ab9c58dcda3da02e3dbb29cb.zip
Merge pull request #1378 from obscuren/issue1367
core, xeth: core.AddressFromMessage removed => crypto.CreateAddress
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 0dbedff43..2a1366fe1 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -802,7 +802,12 @@ func (self *XEth) PushTx(encodedTx string) (string, error) {
}
if tx.To() == nil {
- addr := core.AddressFromMessage(tx)
+ from, err := tx.From()
+ if err != nil {
+ return "", err
+ }
+
+ addr := crypto.CreateAddress(from, tx.Nonce())
glog.V(logger.Info).Infof("Tx(%x) created: %x\n", tx.Hash(), addr)
return addr.Hex(), nil
} else {
@@ -969,7 +974,7 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS
}
if contractCreation {
- addr := core.AddressFromMessage(tx)
+ addr := crypto.CreateAddress(from, nonce)
glog.V(logger.Info).Infof("Tx(%x) created: %x\n", tx.Hash(), addr)
return addr.Hex(), nil
} else {