Backfill WIP

This commit is contained in:
dapplion
2025-04-08 02:25:07 -03:00
parent a5cbab7f3a
commit f9d2c1d2d3
2 changed files with 59 additions and 1 deletions

View File

@@ -439,6 +439,15 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
.slot()
}
/// Returns the slot of the current finalized checkpoint.
pub fn finalized_slot(&self) -> Slot {
self.canonical_head
.cached_head()
.finalized_checkpoint()
.epoch
.start_slot(T::EthSpec::slots_per_epoch())
}
/// Returns a `Arc` of the `BeaconSnapshot` at the head of the canonical chain.
///
/// See `Self::head` for more information.