Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api

This commit is contained in:
realbigsean
2024-05-11 10:24:44 -04:00
5 changed files with 139 additions and 30 deletions

View File

@@ -400,6 +400,14 @@ impl ChainSpec {
}
}
pub fn max_effective_balance_for_fork(&self, fork_name: ForkName) -> u64 {
if fork_name >= ForkName::Electra {
self.max_effective_balance_electra
} else {
self.max_effective_balance
}
}
/// Returns a full `Fork` struct for a given epoch.
pub fn fork_at_epoch(&self, epoch: Epoch) -> Fork {
let current_fork_name = self.fork_name_at_epoch(epoch);