Trait sn_testnet::RpcClient

source ·
pub trait RpcClient {
    // Required method
    fn obtain_peer_id(
        &self,
        rpc_address: SocketAddr
    ) -> Pin<Box<dyn Future<Output = Result<PeerId>> + 'static>>;
}
Expand description

This trait exists for unit testing.

It allows us to return a dummy PeerId during a test without making a real RPC call.

Required Methods§

source

fn obtain_peer_id( &self, rpc_address: SocketAddr ) -> Pin<Box<dyn Future<Output = Result<PeerId>> + 'static>>

Implementors§