aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/pipe.go
diff options
context:
space:
mode:
Diffstat (limited to 'xeth/pipe.go')
-rw-r--r--xeth/pipe.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/xeth/pipe.go b/xeth/pipe.go
index 1e4d0ec60..06820cc86 100644
--- a/xeth/pipe.go
+++ b/xeth/pipe.go
@@ -134,7 +134,7 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et
state := self.chainManager.TransState()
nonce := state.GetNonce(key.Address())
- tx.Nonce = nonce
+ tx.SetNonce(nonce)
tx.Sign(key.PrivateKey)
// Do some pre processing for our "pre" events and hooks
@@ -150,7 +150,7 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et
state.SetNonce(key.Address(), nonce+1)
if contractCreation {
- addr := tx.CreationAddress(self.World().State())
+ addr := core.AddressFromMessage(tx)
pipelogger.Infof("Contract addr %x\n", addr)
}
@@ -163,8 +163,8 @@ func (self *XEth) PushTx(tx *types.Transaction) ([]byte, error) {
return nil, err
}
- if tx.Recipient == nil {
- addr := tx.CreationAddress(self.World().State())
+ if tx.To() == nil {
+ addr := core.AddressFromMessage(tx)
pipelogger.Infof("Contract addr %x\n", addr)
return addr, nil
}