Move OptimismHardfork to new crate reth_optimism_forks (#10963)

This commit is contained in:
Emilia Hane
2024-09-20 18:51:45 +02:00
committed by GitHub
parent 63f2d59068
commit 66089682d7
42 changed files with 302 additions and 120 deletions

View File

@ -63,9 +63,12 @@ pub fn calculate_receipt_root_no_memo_optimism(
// encoding. In the Regolith Hardfork, we must strip the deposit nonce from the
// receipts before calculating the receipt root. This was corrected in the Canyon
// hardfork.
if chain_spec.is_fork_active_at_timestamp(reth_chainspec::OptimismHardfork::Regolith, timestamp) &&
!chain_spec
.is_fork_active_at_timestamp(reth_chainspec::OptimismHardfork::Canyon, timestamp)
if chain_spec
.is_fork_active_at_timestamp(reth_optimism_forks::OptimismHardfork::Regolith, timestamp) &&
!chain_spec.is_fork_active_at_timestamp(
reth_optimism_forks::OptimismHardfork::Canyon,
timestamp,
)
{
let receipts = receipts
.iter()