aboutsummaryrefslogtreecommitdiffstats
path: root/core/state_transition.go
diff options
context:
space:
mode:
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)
}