From 7f9ca8a0d78e9f057d1f0cbc930110d81c8f377e Mon Sep 17 00:00:00 2001 From: Niven Date: Fri, 3 Nov 2023 09:10:22 +0800 Subject: [PATCH 1/2] Cleanup --- lib/ain-grpc/src/rpc/eth.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ain-grpc/src/rpc/eth.rs b/lib/ain-grpc/src/rpc/eth.rs index 3da30d5beb..5d60d90a30 100644 --- a/lib/ain-grpc/src/rpc/eth.rs +++ b/lib/ain-grpc/src/rpc/eth.rs @@ -806,13 +806,12 @@ impl MetachainRPCServer for MetachainRPCModule { let allowance = available .checked_div(fee_cap) .ok_or(RPCError::ValueOverflow)?; - debug!(target:"rpc", "[estimate_gas] allowance: {:#?}", allowance); - if let Ok(allce) = u64::try_from(allowance) { - if hi > allce { + if let Ok(allowance) = u64::try_from(allowance) { + if hi > allowance { debug!("[estimate_gas] gas estimation capped by limited funds. original: {:#?}, balance: {:#?}, feecap: {:#?}, fundable: {:#?}", hi, balance, fee_cap, allce); - hi = allce; + hi = allowance; } } } From 904c9edff68ad526b32359d84c1262f7d8d389ef Mon Sep 17 00:00:00 2001 From: Niven Date: Fri, 3 Nov 2023 09:13:04 +0800 Subject: [PATCH 2/2] Cleanup --- lib/ain-grpc/src/rpc/eth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ain-grpc/src/rpc/eth.rs b/lib/ain-grpc/src/rpc/eth.rs index 5d60d90a30..cd32d09651 100644 --- a/lib/ain-grpc/src/rpc/eth.rs +++ b/lib/ain-grpc/src/rpc/eth.rs @@ -810,7 +810,7 @@ impl MetachainRPCServer for MetachainRPCModule { if let Ok(allowance) = u64::try_from(allowance) { if hi > allowance { - debug!("[estimate_gas] gas estimation capped by limited funds. original: {:#?}, balance: {:#?}, feecap: {:#?}, fundable: {:#?}", hi, balance, fee_cap, allce); + debug!("[estimate_gas] gas estimation capped by limited funds. original: {:#?}, balance: {:#?}, feecap: {:#?}, fundable: {:#?}", hi, balance, fee_cap, allowance); hi = allowance; } }