Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
SeHor05 committed Oct 12, 2024
1 parent c08c7ce commit b1a18e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tvm_vm/src/executor/gas/gas_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ impl Gas {

/// Set input gas to gas limit
pub fn new_gas_limit(&mut self, gas_limit: i64) {
// self.gas_limit = max(0, min(gas_limit, self.gas_limit_max));
self.gas_limit = max(0, gas_limit);
self.gas_limit = max(0, min(gas_limit, self.gas_limit_max));
self.gas_credit = 0;
self.gas_remaining += self.gas_limit - self.gas_base;
self.gas_base = self.gas_limit;
Expand Down

0 comments on commit b1a18e1

Please sign in to comment.