Add interop hardfork in all relevant places. (#14582)

This commit is contained in:
Solar Mithril
2025-02-19 13:18:37 +01:00
committed by GitHub
parent c9a348dd2c
commit 1ae733a7d1
5 changed files with 36 additions and 2 deletions

View File

@ -17,6 +17,9 @@ pub fn revm_spec_by_timestamp_after_bedrock(
chain_spec: impl OpHardforks,
timestamp: u64,
) -> OpSpecId {
// if chain_spec.is_interop_active_at_timestamp(timestamp) {
// OpSpecId::INTEROP
// } else
if chain_spec.is_isthmus_active_at_timestamp(timestamp) {
OpSpecId::ISTHMUS
} else if chain_spec.is_holocene_active_at_timestamp(timestamp) {
@ -49,6 +52,10 @@ mod tests {
let cs = ChainSpecBuilder::mainnet().chain(reth_chainspec::Chain::from_id(10)).into();
f(cs).build()
}
// assert_eq!(
// revm_spec_by_timestamp_after_bedrock(op_cs(|cs| cs.interop_activated()), 0),
// OpSpecId::INTEROP
// );
assert_eq!(
revm_spec_by_timestamp_after_bedrock(op_cs(|cs| cs.isthmus_activated()), 0),
OpSpecId::ISTHMUS