Fix comment for fn gas() in wasm/runtime (#8122)
* Update runtime.rs * Update runtime.rs
This commit is contained in:
parent
21cb08586b
commit
acd7192b17
@ -305,8 +305,8 @@ impl<'a> Runtime<'a> {
|
|||||||
if self.gas_counter > self.gas_limit { return Err(Error::InvalidGasState); }
|
if self.gas_counter > self.gas_limit { return Err(Error::InvalidGasState); }
|
||||||
Ok(self.gas_limit - self.gas_counter)
|
Ok(self.gas_limit - self.gas_counter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Charges gas for the current block of execution. Returns an error in case of running out of gas.
|
/// General gas charging extern.
|
||||||
fn gas(&mut self, args: RuntimeArgs) -> Result<()> {
|
fn gas(&mut self, args: RuntimeArgs) -> Result<()> {
|
||||||
let amount: u32 = args.nth_checked(0)?;
|
let amount: u32 = args.nth_checked(0)?;
|
||||||
if self.charge_gas(amount as u64) {
|
if self.charge_gas(amount as u64) {
|
||||||
|
Loading…
Reference in New Issue
Block a user