Skip to content

Commit

Permalink
fix: conflicts and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Vid201 committed Apr 13, 2024
1 parent 62cff14 commit 6f198b7
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions crates/mempool/src/uopool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,12 @@ impl<M: Middleware + 'static, V: UserOperationValidator> UoPool<M, V> {
&self,
uo: &UserOperation,
) -> Result<UserOperationGasEstimation, MempoolError> {
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)
Expand Down Expand Up @@ -529,13 +532,6 @@ impl<M: Middleware + 'static, V: UserOperationValidator> UoPool<M, V> {
}
};

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,
Expand Down

0 comments on commit 6f198b7

Please sign in to comment.