pub trait AuthorityDiscovery: Send + Debug + 'static {
    fn get_addresses_by_authority_id<'life0, 'async_trait>(
        &'life0 mut self,
        authority: AuthorityDiscoveryId
    ) -> Pin<Box<dyn Future<Output = Option<HashSet<Multiaddr>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn get_authority_ids_by_peer_id<'life0, 'async_trait>(
        &'life0 mut self,
        peer_id: PeerId
    ) -> Pin<Box<dyn Future<Output = Option<HashSet<AuthorityDiscoveryId>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; }
Expand description

An abstraction over the authority discovery service.

Needed for mocking in tests mostly.

Required Methods§

Get the addresses for the given [AuthorityId] from the local address cache.

Get the [AuthorityId] for the given PeerId from the local address cache.

Implementations on Foreign Types§

Implementors§