aboutsummaryrefslogtreecommitdiffstats
path: root/core/state_transition.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-24 22:23:16 +0800
committerobscuren <geffobscura@gmail.com>2015-03-24 22:23:16 +0800
commitff9d66e096e853883c269b41cc94b17d4bc95261 (patch)
treebb22f066b13880d53b40b87c5695568bc799a4f9 /core/state_transition.go
parent23bccbbc587aa22057eb7ae29c5b87d44b7cac7d (diff)
downloadgo-tangerine-ff9d66e096e853883c269b41cc94b17d4bc95261.tar.gz
go-tangerine-ff9d66e096e853883c269b41cc94b17d4bc95261.tar.zst
go-tangerine-ff9d66e096e853883c269b41cc94b17d4bc95261.zip
Cleaned up changes
Diffstat (limited to 'core/state_transition.go')
-rw-r--r--core/state_transition.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index 6312dee88..10a49f829 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -195,14 +195,10 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
return nil, nil, InvalidTxError(err)
}
- // Increment the nonce for the next transaction
-
vmenv := self.env
var ref vm.ContextRef
if MessageCreatesContract(msg) {
- //contract := makeContract(msg, self.state)
- //addr := contract.Address()
- ret, err, ref = vmenv.Create(sender, nil, self.msg.Data(), self.gas, self.gasPrice, self.value)
+ ret, err, ref = vmenv.Create(sender, self.msg.Data(), self.gas, self.gasPrice, self.value)
if err == nil {
dataGas := big.NewInt(int64(len(ret)))
dataGas.Mul(dataGas, vm.GasCreateByte)
@@ -213,6 +209,7 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
}
}
} else {
+ // Increment the nonce for the next transaction
self.state.SetNonce(sender.Address(), sender.Nonce()+1)
ret, err = vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value)
}