Skip to content

Commit f6a6185

Browse files
committed
hot fix 2
1 parent 4e7ecd7 commit f6a6185

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

core/state_transition.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, quotaUsed
353353
gu := st.gasUsed()
354354
if st.modelGas != nil && len(st.modelGas) > 0 { //pay ctx to the model authors by the model gas * current price
355355
for addr, mgas := range st.modelGas {
356-
if int64(mgas) <= 0 || mgas > params.MODEL_GAS_LIMIT {
356+
if int64(mgas) <= 0 || mgas > params.MODEL_GAS_UP_LIMIT {
357357
continue
358358
}
359359

core/vm/interpreter.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ func (in *CVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
248248
if modelMeta.Gas == uint64(0) {
249249
//modelMeta.SetGas(params.MODEL_GAS_LIMIT)
250250
modelMeta.SetGas(0)
251-
} else if modelMeta.Gas > params.MODEL_GAS_UP_LIMIT {
252-
modelMeta.SetGas(params.MODEL_GAS_LIMIT)
253-
} else if modelMeta.Gas < params.MODEL_GAS_LIMIT {
251+
} else if modelMeta.Gas > params.MODEL_GAS_UP_LIMIT{
254252
modelMeta.SetGas(params.MODEL_GAS_LIMIT)
255253
} else if int64(modelMeta.Gas) < 0 {
256254
modelMeta.SetGas(0)

0 commit comments

Comments
 (0)