From 6f198b79e125cdb56b1c86b81451e093404fdbcd Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Sat, 13 Apr 2024 08:05:53 +0200 Subject: [PATCH] fix: conflicts and ci --- crates/mempool/src/uopool.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/crates/mempool/src/uopool.rs b/crates/mempool/src/uopool.rs index 63206b44..8664d54e 100644 --- a/crates/mempool/src/uopool.rs +++ b/crates/mempool/src/uopool.rs @@ -454,9 +454,12 @@ impl UoPool { &self, uo: &UserOperation, ) -> Result { - let pre_verification_gas = Overhead::default() - .calculate_pre_verification_gas(uo) - .saturating_add(PRE_VERIFICATION_SAFE_RESERVE.into()); + let pre_verification_gas = div_ceil( + Overhead::default().calculate_pre_verification_gas(uo).saturating_mul( + U256::from(100).saturating_add(PRE_VERIFICATION_SAFE_RESERVE_PERC.into()), + ), + U256::from(100), + ); let (verification_gas_limit, call_gas_limit) = match self.mode { UoPoolMode::Standard => estimate_user_op_gas(&uo.user_operation, &self.entry_point) @@ -529,13 +532,6 @@ impl UoPool { } }; - let pre_verification_gas = div_ceil( - Overhead::default().calculate_pre_verification_gas(uo).saturating_mul( - U256::from(100).saturating_add(PRE_VERIFICATION_SAFE_RESERVE_PERC.into()), - ), - U256::from(100), - ); - Ok(UserOperationGasEstimation { pre_verification_gas, verification_gas_limit,