We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1ebdfab + 03212a3 commit 85ec4cbCopy full SHA for 85ec4cb
packages/vm/src/vm.rs
@@ -148,12 +148,12 @@ where
148
.expect("Wasmer instance is not set. This is a bug in the lifecycle.")
149
}
150
151
- pub fn decrease_gas_left(&self, gas_used: u64) -> Result<(), Error> {
+ pub fn decrease_gas_left(&self, gas: u64) -> Result<(), Error> {
152
let gas_left = self.get_gas_left();
153
- if gas_used > gas_left {
+ if gas > gas_left {
154
Err(Error::OutOfGasError)
155
} else {
156
- self.set_gas_left(gas_left.saturating_sub(gas_used.into()));
+ self.set_gas_left(gas_left.saturating_sub(gas.into()));
157
Ok(())
158
159
0 commit comments