aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/pipe.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-18 22:18:13 +0800
committerobscuren <geffobscura@gmail.com>2014-12-18 22:18:13 +0800
commitdb494170dc819b1eb0d267b6e1ab36c6cfb63569 (patch)
tree8e2b374519a0ae5e20a9db0c2a4a86bf3375329e /xeth/pipe.go
parent9e286e1c337319f47b2b04e9e1022ac05470a296 (diff)
downloadgo-tangerine-db494170dc819b1eb0d267b6e1ab36c6cfb63569.tar
go-tangerine-db494170dc819b1eb0d267b6e1ab36c6cfb63569.tar.gz
go-tangerine-db494170dc819b1eb0d267b6e1ab36c6cfb63569.tar.bz2
go-tangerine-db494170dc819b1eb0d267b6e1ab36c6cfb63569.tar.lz
go-tangerine-db494170dc819b1eb0d267b6e1ab36c6cfb63569.tar.xz
go-tangerine-db494170dc819b1eb0d267b6e1ab36c6cfb63569.tar.zst
go-tangerine-db494170dc819b1eb0d267b6e1ab36c6cfb63569.zip
Created generic message (easy for testing)
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
}