From ba4f536f93b2a21c2f57a1e728bdabd306afbe65 Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Sun, 28 Jan 2024 16:55:13 +0100 Subject: [PATCH] Separate `activation_timestamp` and `mainnet_activation_timestamp` methods (#6261) --- crates/ethereum-forks/src/hardfork.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/ethereum-forks/src/hardfork.rs b/crates/ethereum-forks/src/hardfork.rs index dcc54243ba..2b4a742432 100644 --- a/crates/ethereum-forks/src/hardfork.rs +++ b/crates/ethereum-forks/src/hardfork.rs @@ -88,11 +88,16 @@ impl Hardfork { } } - /// Retrieves the activation timestamp for the specified hardfork on the Ethereum mainnet. - pub fn mainnet_activation_timestamp(&self, chain: Chain) -> Option { + /// Retrieves the activation timestamp for the specified hardfork on the given chain. + pub fn activation_timestamp(&self, chain: Chain) -> Option { if chain != Chain::mainnet() { return None; } + self.mainnet_activation_timestamp() + } + + /// Retrieves the activation timestamp for the specified hardfork on the Ethereum mainnet. + pub fn mainnet_activation_timestamp(&self) -> Option { match self { Hardfork::Frontier => Some(1438226773), Hardfork::Homestead => Some(1457938193),