From 70012125a3f7316cdfef1b58e953d56f022771f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Fri, 13 Dec 2024 21:38:58 +0000 Subject: [PATCH] Address missing EIP-150 fix in one gas meter unit test --- substrate/frame/revive/src/gas.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/substrate/frame/revive/src/gas.rs b/substrate/frame/revive/src/gas.rs index 6f20cf54edad..e360a4ad6b2f 100644 --- a/substrate/frame/revive/src/gas.rs +++ b/substrate/frame/revive/src/gas.rs @@ -379,15 +379,16 @@ mod tests { } #[test] - /// Currently, passing a `Weight` of 0 to `nested` will consume all of the meter's current gas, - /// which with EIP-150 is limited to 63/64ths of the total. + /// Previously, passing a `Weight` of 0 to `nested` would consume all of the meter's current gas. + /// + /// Now, a `Weight` of 0 means no gas for the nested call. fn nested_zero_gas_requested() { let test_weight = 50000.into(); let mut gas_meter = GasMeter::::new(test_weight); let gas_for_nested_call = gas_meter.nested(0.into()); - assert_eq!(gas_meter.gas_left(), 781.into()); - assert_eq!(gas_for_nested_call.gas_left(), 49219.into()) + assert_eq!(gas_meter.gas_left(), 50000.into()); + assert_eq!(gas_for_nested_call.gas_left(), 0.into()) } #[test]