use crate::{ordered_broadcast::types::SequencersProvider, types::Epoch}; use commonware_cryptography::PublicKey; use commonware_utils::{ordered::Set, TryFromIterator}; use std::sync::Arc; #[derive(Clone)] pub struct Sequencers { sequencers: Arc>, } impl Sequencers

{ pub fn new(participants: Vec

) -> Self { Self { sequencers: Arc::new(Set::try_from_iter(participants).unwrap()), } } } impl SequencersProvider for Sequencers

{ type PublicKey = P; fn sequencers(&self, _: Epoch) -> Option>> { Some(self.sequencers.clone()) } }