Skip to content

Commit

Permalink
take while
Browse files Browse the repository at this point in the history
  • Loading branch information
AmbientTea committed Feb 26, 2025
1 parent 31806da commit 838c55c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toolkit/pallets/block-production-log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub mod pallet {
}

pub fn peek_prefix<'a>(slot: Slot) -> impl Iterator<Item = (Slot, T::BlockProducerId)> {
Log::<T>::get().into_iter().filter(move |(s, _)| s <= &slot)
Log::<T>::get().into_iter().take_while(move |(s, _)| s <= &slot)
}

pub fn drop_prefix<'a>(slot: Slot) {
Expand Down

0 comments on commit 838c55c

Please sign in to comment.