From fd15a64b0c24be0e1570e83d274c8b0300dca7c6 Mon Sep 17 00:00:00 2001 From: katsumata <12413150+winor30@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:37:35 +0900 Subject: [PATCH] refactor: Refactor calculations and remove unused function in `uopool/utils.rs` - Removed commented out code for calculating `word_cost` - Simplified calculation of `word_cost` by removing unnecessary division - Added comments to explain the purpose of each calculation in the `calculate_pre_verification_gas()` function - Removed unused function `calculate_valid_gas()` in the `utils.rs` file in the `uopool` crate. --- crates/uopool/src/utils.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crates/uopool/src/utils.rs b/crates/uopool/src/utils.rs index 683c1756..7afbcc09 100644 --- a/crates/uopool/src/utils.rs +++ b/crates/uopool/src/utils.rs @@ -80,12 +80,6 @@ impl Overhead { .saturating_mul(U256::from(uo_pack.len() + 31)), U256::from(32), ); - // let word_cost = self - // .per_user_op_word - // .saturating_mul(U256::from(word_len)) - // .checked_div(U256::from(32)) - // .unwrap_or_default() - // .saturating_add(rounding_const_word_cost); // fixed / bundle_size // -> fixed / bundle_size + rounding_const