committees are sorted

This commit is contained in:
dapplion
2024-06-19 12:59:27 +02:00
parent a8d8989c05
commit d67270f899
3 changed files with 15 additions and 12 deletions

View File

@@ -183,6 +183,8 @@ impl CommitteeCache {
}
/// Get all the Beacon committees at a given `slot`.
///
/// Committees are sorted by ascending index order 0..committees_per_slot
pub fn get_beacon_committees_at_slot(&self, slot: Slot) -> Result<Vec<BeaconCommittee>, Error> {
if self.initialized_epoch.is_none() {
return Err(Error::CommitteeCacheUninitialized(None));