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.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index 7616686db..1994cabf6 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -8,6 +8,7 @@ import (
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
+ "github.com/ethereum/go-ethereum/params"
)
const tryJit = false
@@ -178,7 +179,7 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
)
// Transaction gas
- if err = self.UseGas(vm.GasTx); err != nil {
+ if err = self.UseGas(params.TxGas); err != nil {
return nil, nil, InvalidTxError(err)
}
@@ -186,9 +187,9 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
dgas := new(big.Int)
for _, byt := range self.data {
if byt != 0 {
- dgas.Add(dgas, vm.GasTxDataNonzeroByte)
+ dgas.Add(dgas, params.TxDataNonZeroGas)
} else {
- dgas.Add(dgas, vm.GasTxDataZeroByte)
+ dgas.Add(dgas, params.TxDataZeroGas)
}
}
@@ -202,7 +203,7 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
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)
+ dataGas.Mul(dataGas, params.CreateDataGas)
if err := self.UseGas(dataGas); err == nil {
ref.SetCode(ret)
} else {