Skip to content

Commit 77d058c

Browse files
committed
change gas_used to gas in decrease_gas_left
1 parent 3a83bac commit 77d058c

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
@@ -149,12 +149,12 @@ where
149149
.expect("Wasmer instance is not set. This is a bug in the lifecycle.")
150150
}
151151

152-
pub fn decrease_gas_left(&self, gas_used: u64) -> Result<(), Error> {
152+
pub fn decrease_gas_left(&self, gas: u64) -> Result<(), Error> {
153153
let gas_left = self.get_gas_left();
154-
if gas_used > gas_left {
154+
if gas > gas_left {
155155
Err(Error::OutOfGasError)
156156
} else {
157-
self.set_gas_left(gas_left.saturating_sub(gas_used.into()));
157+
self.set_gas_left(gas_left.saturating_sub(gas.into()));
158158
Ok(())
159159
}
160160
}

0 commit comments

Comments
 (0)