Skip to content

Commit

Permalink
Merge pull request #22 from lambdaclass/one_Gas_bug
Browse files Browse the repository at this point in the history
fix minor gas bug
  • Loading branch information
JulianGCalderon authored Nov 20, 2024
2 parents 0b11466 + 3356582 commit e16094d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vm/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn eval_builtin_withdraw_gas(
if gas >= gas_cost {
EvalAction::NormalBranch(0, smallvec![range_check, Value::U64(new_gas)])
} else {
EvalAction::NormalBranch(1, smallvec![range_check, Value::U64(new_gas)])
EvalAction::NormalBranch(1, smallvec![range_check, Value::U64(gas)])
}
} else {
EvalAction::NormalBranch(1, smallvec![range_check, Value::U64(gas)])
Expand All @@ -76,7 +76,7 @@ pub fn eval_withdraw_gas(
if gas >= gas_cost {
EvalAction::NormalBranch(0, smallvec![range_check, Value::U64(new_gas)])
} else {
EvalAction::NormalBranch(1, smallvec![range_check, Value::U64(new_gas)])
EvalAction::NormalBranch(1, smallvec![range_check, Value::U64(gas)])
}
} else {
EvalAction::NormalBranch(1, smallvec![range_check, Value::U64(gas)])
Expand Down

0 comments on commit e16094d

Please sign in to comment.