Skip to content

Commit 85ec4cb

Browse files
authored
Merge branch 'master' into refactor
2 parents 1ebdfab + 03212a3 commit 85ec4cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/vm/src/vm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ where
148148
.expect("Wasmer instance is not set. This is a bug in the lifecycle.")
149149
}
150150

151-
pub fn decrease_gas_left(&self, gas_used: u64) -> Result<(), Error> {
151+
pub fn decrease_gas_left(&self, gas: u64) -> Result<(), Error> {
152152
let gas_left = self.get_gas_left();
153-
if gas_used > gas_left {
153+
if gas > gas_left {
154154
Err(Error::OutOfGasError)
155155
} else {
156-
self.set_gas_left(gas_left.saturating_sub(gas_used.into()));
156+
self.set_gas_left(gas_left.saturating_sub(gas.into()));
157157
Ok(())
158158
}
159159
}

0 commit comments

Comments
 (0)