Add holocene mainnet time (#13419)

This commit is contained in:
cody-wang-cb
2024-12-17 00:38:18 -05:00
committed by GitHub
parent 952eeae2a1
commit 03649f256d
2 changed files with 10 additions and 4 deletions

View File

@ -518,7 +518,11 @@ mod tests {
),
(
Head { number: 0, timestamp: 1726070401, ..Default::default() },
ForkId { hash: ForkHash([0xbc, 0x38, 0xf9, 0xca]), next: 0 },
ForkId { hash: ForkHash([0xbc, 0x38, 0xf9, 0xca]), next: 1736445601 },
),
(
Head { number: 0, timestamp: 1736445601, ..Default::default() },
ForkId { hash: ForkHash([0x3a, 0x2a, 0xf1, 0x83]), next: 0 },
),
],
);
@ -689,7 +693,7 @@ mod tests {
#[test]
fn latest_base_mainnet_fork_id() {
assert_eq!(
ForkId { hash: ForkHash([0xbc, 0x38, 0xf9, 0xca]), next: 0 },
ForkId { hash: ForkHash([0x3a, 0x2a, 0xf1, 0x83]), next: 0 },
BASE_MAINNET.latest_fork_id()
)
}
@ -698,7 +702,7 @@ mod tests {
fn latest_base_mainnet_fork_id_with_builder() {
let base_mainnet = OpChainSpecBuilder::base_mainnet().build();
assert_eq!(
ForkId { hash: ForkHash([0xbc, 0x38, 0xf9, 0xca]), next: 0 },
ForkId { hash: ForkHash([0x3a, 0x2a, 0xf1, 0x83]), next: 0 },
base_mainnet.latest_fork_id()
)
}

View File

@ -196,7 +196,7 @@ impl OpHardfork {
Self::Ecotone => Some(1710374401),
Self::Fjord => Some(1720627201),
Self::Granite => Some(1726070401),
Self::Holocene => None,
Self::Holocene => Some(1736445601),
Self::Isthmus => todo!(),
},
)
@ -230,6 +230,7 @@ impl OpHardfork {
(Self::Ecotone.boxed(), ForkCondition::Timestamp(1710374401)),
(Self::Fjord.boxed(), ForkCondition::Timestamp(1720627201)),
(Self::Granite.boxed(), ForkCondition::Timestamp(1726070401)),
(Self::Holocene.boxed(), ForkCondition::Timestamp(1736445601)),
])
}
@ -325,6 +326,7 @@ impl OpHardfork {
(Self::Ecotone.boxed(), ForkCondition::Timestamp(1710374401)),
(Self::Fjord.boxed(), ForkCondition::Timestamp(1720627201)),
(Self::Granite.boxed(), ForkCondition::Timestamp(1726070401)),
(Self::Holocene.boxed(), ForkCondition::Timestamp(1736445601)),
])
}
}