diff --git a/moveos/moveos-wasm/src/middlewares/gas_metering.rs b/moveos/moveos-wasm/src/middlewares/gas_metering.rs index a4271dfc70..3c1a42010b 100644 --- a/moveos/moveos-wasm/src/middlewares/gas_metering.rs +++ b/moveos/moveos-wasm/src/middlewares/gas_metering.rs @@ -59,7 +59,7 @@ impl ModuleMiddleware for GasMiddleware { let charge_function_index = self.charge_function_index.lock().unwrap().unwrap(); Box::new(GasFunctionMiddleware { - charge_function_index: charge_function_index.clone(), + charge_function_index: charge_function_index, accumulated_cost: 0, cost_function: self.cost_function.clone(), })