Trait tc_authority_discovery::NetworkProvider[][src]

pub trait NetworkProvider: NetworkStateInfo {
    fn put_value(&self, key: Key, value: Vec<u8>);
fn get_value(&self, key: &Key); }

NetworkProvider provides Worker with all necessary hooks into the underlying Tetcore networking. Using this trait abstraction instead of tc_network::NetworkService directly is necessary to unit test Worker.

Required methods

fn put_value(&self, key: Key, value: Vec<u8>)[src]

Start putting a value in the Dht.

fn get_value(&self, key: &Key)[src]

Start getting a value from the Dht.

Loading content...

Implementations on Foreign Types

impl<B, H> NetworkProvider for NetworkService<B, H> where
    B: BlockT + 'static,
    H: ExHashT
[src]

Loading content...

Implementors

Loading content...