From b1a18e12e839fff533a2b3aabc18e87e1fadb3e4 Mon Sep 17 00:00:00 2001 From: sehor05 Date: Sat, 12 Oct 2024 22:16:54 +0300 Subject: [PATCH] revert --- tvm_vm/src/executor/gas/gas_state.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tvm_vm/src/executor/gas/gas_state.rs b/tvm_vm/src/executor/gas/gas_state.rs index 624efdd9..3945ba48 100644 --- a/tvm_vm/src/executor/gas/gas_state.rs +++ b/tvm_vm/src/executor/gas/gas_state.rs @@ -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;