Skip to content

Commit

Permalink
resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyan-gupta committed Jan 31, 2025
1 parent 8d6f199 commit 4ba3b7e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/store/src/adapter/epoch_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ impl EpochStoreAdapter {
}

// Iterate over all the epoch infos in store
pub fn iter_epoch_info<'a>(&'a self) -> Box<dyn Iterator<Item = (EpochId, EpochInfo)> + 'a> {
let iter = self
.store
pub fn iter_epoch_info<'a>(&'a self) -> impl Iterator<Item = (EpochId, EpochInfo)> + 'a {
self.store
.iter(DBCol::EpochInfo)
.map(Result::unwrap)
.filter(|(key, _)| key.as_ref() != AGGREGATOR_KEY)
Expand All @@ -62,8 +61,7 @@ impl EpochStoreAdapter {
EpochId::try_from_slice(key.as_ref()).unwrap(),
EpochInfo::try_from_slice(value.as_ref()).unwrap(),
)
});
Box::new(iter)
})
}

pub fn get_epoch_sync_proof(&self) -> Result<Option<EpochSyncProofV1>, Error> {
Expand Down

0 comments on commit 4ba3b7e

Please sign in to comment.