Skip to main content

TestableMembership

Trait TestableMembership 

Source
pub trait TestableMembership<TYPES: NodeType>: Membership<TYPES> {
    // Required methods
    fn new(
        quorum_members: Vec<PeerConfig<TYPES>>,
        da_members: Vec<PeerConfig<TYPES>>,
        public_key: TYPES::SignatureKey,
        epoch_height: u64,
    ) -> Self;
    fn set_leaf_fetcher(
        &self,
        network: Arc<dyn LeafFetcherNetwork<TYPES>>,
        storage: TestStorage<TYPES>,
        public_key: TYPES::SignatureKey,
        channel: Receiver<Event<TYPES>>,
    );
}
Expand description

Test-only extension of Membership that lets tests install the Leaf2Fetcher wiring needed for epoch-root catchup. Production memberships don’t need this — only types that route catchup through a test fetcher (e.g. StrictMembership) implement it.

Required Methods§

Source

fn new( quorum_members: Vec<PeerConfig<TYPES>>, da_members: Vec<PeerConfig<TYPES>>, public_key: TYPES::SignatureKey, epoch_height: u64, ) -> Self

Construct a membership for tests.

Source

fn set_leaf_fetcher( &self, network: Arc<dyn LeafFetcherNetwork<TYPES>>, storage: TestStorage<TYPES>, public_key: TYPES::SignatureKey, channel: Receiver<Event<TYPES>>, )

Install a fully wired leaf fetcher. Must be called before any code path that triggers catchup (get_epoch_root / get_epoch_drb).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§