Skip to content

Commit

Permalink
hot fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ucwong committed Jun 27, 2019
1 parent 4e7ecd7 commit f6a6185
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, quotaUsed
gu := st.gasUsed()
if st.modelGas != nil && len(st.modelGas) > 0 { //pay ctx to the model authors by the model gas * current price
for addr, mgas := range st.modelGas {
if int64(mgas) <= 0 || mgas > params.MODEL_GAS_LIMIT {
if int64(mgas) <= 0 || mgas > params.MODEL_GAS_UP_LIMIT {
continue
}

Expand Down
4 changes: 1 addition & 3 deletions core/vm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ func (in *CVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
if modelMeta.Gas == uint64(0) {
//modelMeta.SetGas(params.MODEL_GAS_LIMIT)
modelMeta.SetGas(0)
} else if modelMeta.Gas > params.MODEL_GAS_UP_LIMIT {
modelMeta.SetGas(params.MODEL_GAS_LIMIT)
} else if modelMeta.Gas < params.MODEL_GAS_LIMIT {
} else if modelMeta.Gas > params.MODEL_GAS_UP_LIMIT{
modelMeta.SetGas(params.MODEL_GAS_LIMIT)
} else if int64(modelMeta.Gas) < 0 {
modelMeta.SetGas(0)
Expand Down

0 comments on commit f6a6185

Please sign in to comment.