Repository: paradigmxyz/reth (language: rust)

Issue:
remove Option on is_paris_activated call
### Describe the feature

this deviates from other is_hardfork_active function that just return a bool

https://github.com/paradigmxyz/reth/blob/bdb35ae30b6486c5cf8f06ba4aebad248ea8f861/crates/ethereum-forks/src/hardforks/ethereum.rs#L76-L76

and we can remove the option here and treat the _ => as a false

then we can simplify all of this is_some_and calls like:

https://github.com/paradigmxyz/reth/blob/bdb35ae30b6486c5cf8f06ba4aebad248ea8f861/crates/consensus/common/src/calc.rs#L28-L28

### Additional context

_No response_


Discussion / hints:
Can I work on this?

Fix patch:
diff --git a/crates/consensus/common/src/calc.rs b/crates/consensus/common/src/calc.rs
index 7680a568a08a..843c021730c3 100644
--- a/crates/consensus/common/src/calc.rs
+++ b/crates/consensus/common/src/calc.rs
@@ -25,7 +25,7 @@ pub fn base_block_reward(
     chain_spec: impl EthereumHardforks,
     block_number: BlockNumber,
 ) -> Option<u128> {
-    if chain_spec.is_paris_active_at_block(block_number).is_some_and(|active| active) {
+    if chain_spec.is_paris_active_at_block(block_number) {
         None
     } else {
         Some(base_block_reward_pre_merge(chain_spec, block_number))
diff --git a/crates/ethereum-forks/src/hardforks/ethereum.rs b/crates/ethereum-forks/src/hardforks/ethereum.rs
index c9b1a115d23b..46a3c7df6d5e 100644
--- a/crates/ethereum-forks/src/hardforks/ethereum.rs
+++ b/crates/ethereum-forks/src/hardforks/ethereum.rs
@@ -73,13 +73,13 @@ pub trait EthereumHardforks: Clone {
     /// The Paris hardfork (merge) is activated via block number. If we have knowledge of the block,
     /// this function will return true if the block number is greater than or equal to the Paris
     /// (merge) block.
-    fn is_paris_active_at_block(&self, block_number: u64) -> Option<bool> {
+    fn is_paris_active_at_block(&self, block_number: u64) -> bool {
         match self.ethereum_fork_activation(EthereumHardfork::Paris) {
             ForkCondition::TTD { activation_block_number, .. } => {
-                Some(block_number >= activation_block_number)
+                block_number >= activation_block_number
             }
-            ForkCondition::Block(paris_block) => Some(block_number >= paris_block),
-            _ => None,
+            ForkCondition::Block(paris_block) => block_number >= paris_block,
+            _ => false,
         }
     }
 
diff --git a/crates/ethereum/consensus/src/lib.rs b/crates/ethereum/consensus/src/lib.rs
index ba71dc84b07e..51647398f927 100644
--- a/crates/ethereum/consensus/src/lib.rs
+++ b/crates/ethereum/consensus/src/lib.rs
@@ -203,8 +203,7 @@ where
         header: &H,
         _total_difficulty: U256,
     ) -> Result<(), ConsensusError> {
-        let is_post_merge =
-            self.chain_spec.is_paris_active_at_block(header.number()).is_some_and(|active| active);
+        let is_post_merge = self.chain_spec.is_paris_active_at_block(header.number());
 
         if is_post_merge {
             if !header.difficulty().is_zero() {
diff --git a/crates/ethereum/evm/src/config.rs b/crates/ethereum/evm/src/config.rs
index 272b0a021ca2..93a1fd99dd31 100644
--- a/crates/ethereum/evm/src/config.rs
+++ b/crates/ethereum/evm/src/config.rs
@@ -34,7 +34,7 @@ pub fn revm_spec_by_timestamp_and_block_number(
         .active_at_timestamp_or_number(timestamp, block_number)
     {
         SpecId::SHANGHAI
-    } else if chain_spec.is_paris_active_at_block(block_number).is_some_and(|active| active) {
+    } else if chain_spec.is_paris_active_at_block(block_number) {
         SpecId::MERGE
     } else if chain_spec
         .fork(EthereumHardfork::London)


Test patch: