aboutsummaryrefslogtreecommitdiffstats
path: root/core/state_transition.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-06-25 20:47:21 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-06-30 00:51:48 +0800
commit992dc74efdab530b716828e6f4a8468d27db41f0 (patch)
tree71fa7a8beadbe32305934b1156b69c27b8fa7282 /core/state_transition.go
parent0b22ad99c18b6aaa77afc32113c308f12a07e843 (diff)
downloadgo-tangerine-992dc74efdab530b716828e6f4a8468d27db41f0.tar.gz
go-tangerine-992dc74efdab530b716828e6f4a8468d27db41f0.tar.zst
go-tangerine-992dc74efdab530b716828e6f4a8468d27db41f0.zip
core: avoid duplicate calls to Transaction.Data
Diffstat (limited to 'core/state_transition.go')
-rw-r--r--core/state_transition.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index 5844ad3c8..60bd36d90 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -203,14 +203,14 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
sender, _ := self.From() // err checked in preCheck
// Pay intrinsic gas
- if err = self.UseGas(IntrinsicGas(self.msg.Data())); err != nil {
+ if err = self.UseGas(IntrinsicGas(self.data)); err != nil {
return nil, nil, InvalidTxError(err)
}
vmenv := self.env
var ref vm.ContextRef
if MessageCreatesContract(msg) {
- ret, err, ref = vmenv.Create(sender, self.msg.Data(), self.gas, self.gasPrice, self.value)
+ ret, err, ref = vmenv.Create(sender, self.data, self.gas, self.gasPrice, self.value)
if err == nil {
dataGas := big.NewInt(int64(len(ret)))
dataGas.Mul(dataGas, params.CreateDataGas)
@@ -224,7 +224,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(sender, self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value)
+ ret, err = vmenv.Call(sender, self.To().Address(), self.data, self.gas, self.gasPrice, self.value)
}
if err != nil && IsValueTransferErr(err) {