Skip to content

Commit

Permalink
Merge pull request #2 from ethereum-optimism/emhane/revm-hack-isthmus…
Browse files Browse the repository at this point in the history
…-spec-id

feat(isthmus): hack, return holocene revm spec id
  • Loading branch information
emhane authored Dec 13, 2024
2 parents 328d493 + 7825a27 commit 4cbde7d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/optimism/evm/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ pub fn revm_spec_by_timestamp_after_bedrock(
chain_spec: &OpChainSpec,
timestamp: u64,
) -> revm_primitives::SpecId {
if chain_spec.fork(OpHardfork::Isthmus).active_at_timestamp(timestamp) {
todo!()
} else if chain_spec.fork(OpHardfork::Holocene).active_at_timestamp(timestamp) {
revm_primitives::HOLOCENE
if chain_spec.fork(OpHardfork::Isthmus).active_at_timestamp(timestamp) ||
chain_spec.fork(OpHardfork::Holocene).active_at_timestamp(timestamp)
{
revm_primitives::HOLOCENE // todo: replace <https://github.com/bluealloy/revm/issues/1874>
} else if chain_spec.fork(OpHardfork::Granite).active_at_timestamp(timestamp) {
revm_primitives::GRANITE
} else if chain_spec.fork(OpHardfork::Fjord).active_at_timestamp(timestamp) {
Expand All @@ -33,10 +33,10 @@ pub fn revm_spec_by_timestamp_after_bedrock(

/// Map the latest active hardfork at the given block to a revm [`SpecId`](revm_primitives::SpecId).
pub fn revm_spec(chain_spec: &OpChainSpec, block: &Head) -> revm_primitives::SpecId {
if chain_spec.fork(OpHardfork::Isthmus).active_at_head(block) {
todo!()
} else if chain_spec.fork(OpHardfork::Holocene).active_at_head(block) {
revm_primitives::HOLOCENE
if chain_spec.fork(OpHardfork::Isthmus).active_at_head(block) ||
chain_spec.fork(OpHardfork::Holocene).active_at_head(block)
{
revm_primitives::HOLOCENE // todo: replace <https://github.com/bluealloy/revm/issues/1874>
} else if chain_spec.fork(OpHardfork::Granite).active_at_head(block) {
revm_primitives::GRANITE
} else if chain_spec.fork(OpHardfork::Fjord).active_at_head(block) {
Expand Down

0 comments on commit 4cbde7d

Please sign in to comment.