Skip to content

Commit

Permalink
refactor: Refactor calculations and remove unused function in `uopool…
Browse files Browse the repository at this point in the history
…/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.
  • Loading branch information
winor30 committed Sep 27, 2023
1 parent 9c88f25 commit fd15a64
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions crates/uopool/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd15a64

Please sign in to comment.