diff --git a/ethereum-consensus/src/state_transition/context.rs b/ethereum-consensus/src/state_transition/context.rs index 16e88c82f..a0205267a 100644 --- a/ethereum-consensus/src/state_transition/context.rs +++ b/ethereum-consensus/src/state_transition/context.rs @@ -362,6 +362,16 @@ impl Context { } } + pub fn fork_version_for(&self, fork: Fork) -> Version { + match fork { + Fork::Phase0 => self.genesis_fork_version, + Fork::Altair => self.altair_fork_version, + Fork::Bellatrix => self.bellatrix_fork_version, + Fork::Capella => self.capella_fork_version, + Fork::Deneb => self.deneb_fork_version, + } + } + pub fn genesis_time(&self) -> Result { match &self.name { Network::Mainnet => Ok(crate::clock::MAINNET_GENESIS_TIME),