Skip to content

Commit

Permalink
refactor: Optimize utility functions
Browse files Browse the repository at this point in the history
- Refactored code in `crates/uopool/src/utils.rs` to improve readability and maintainability
- Made performance optimizations in the refactored code to decrease execution time
- Reviewed and addressed code comments for better code quality
- No breaking changes introduced in this pull request
  • Loading branch information
winor30 committed Sep 26, 2023
1 parent 6bdf140 commit 9c88f25
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/uopool/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,16 @@ pub mod tests {
);
}

#[test]
fn div_ceil_divisible_calculation() {
assert_eq!(div_ceil(U256::from(10), U256::from(2)), 5.into());
}

#[test]
fn div_ceil_no_divisible_calculation() {
assert_eq!(div_ceil(U256::from(10), U256::from(3)), 4.into());
}

pub fn mempool_test_case<T>(mut mempool: T, not_found_error_message: &str)
where
T: Mempool<UserOperations = Vec<UserOperation>> + Debug,
Expand Down

0 comments on commit 9c88f25

Please sign in to comment.