Updated gast costs
This commit is contained in:
@ -12,11 +12,7 @@ import (
|
||||
|
||||
const tryJit = false
|
||||
|
||||
var (
|
||||
GasTx = big.NewInt(21000)
|
||||
GasTxNonZeroByte = big.NewInt(37)
|
||||
GasTxZeroByte = big.NewInt(2)
|
||||
)
|
||||
var ()
|
||||
|
||||
/*
|
||||
* The State transitioning model
|
||||
@ -176,7 +172,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
|
||||
//sender.Nonce += 1
|
||||
|
||||
// Transaction gas
|
||||
if err = self.UseGas(GasTx); err != nil {
|
||||
if err = self.UseGas(vm.GasTx); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@ -184,9 +180,9 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
|
||||
var dgas int64
|
||||
for _, byt := range self.data {
|
||||
if byt != 0 {
|
||||
dgas += GasTxNonZeroByte.Int64()
|
||||
dgas += vm.GasTxDataNonzeroByte.Int64()
|
||||
} else {
|
||||
dgas += GasTxZeroByte.Int64()
|
||||
dgas += vm.GasTxDataZeroByte.Int64()
|
||||
}
|
||||
}
|
||||
if err = self.UseGas(big.NewInt(dgas)); err != nil {
|
||||
|
Reference in New Issue
Block a user