Function libp2p_networking::network::gen_transport
source · pub async fn gen_transport<T: NodeType>(
identity: Keypair,
stake_table: Option<Arc<RwLock<T::Membership>>>,
auth_message: Option<Vec<u8>>,
) -> Result<Boxed<(PeerId, StreamMuxerBox)>, NetworkError>
Expand description
Generates an authenticated transport checked against the stake table. If the stake table or authentication message is not provided, the transport will not participate in stake table authentication.
§Errors
If we could not create a DNS transport