Crate libp2p_allow_block_list

source ·
Expand description

A libp2p module for managing allow and blocks lists to peers.

§Allow list example

#[derive(NetworkBehaviour)]
struct MyBehaviour {
   allowed_peers: allow_block_list::Behaviour<AllowedPeers>,
}

let behaviour = MyBehaviour {
    allowed_peers: allow_block_list::Behaviour::default()
};

§Block list example

#[derive(NetworkBehaviour)]
struct MyBehaviour {
   blocked_peers: allow_block_list::Behaviour<BlockedPeers>,
}

let behaviour = MyBehaviour {
    blocked_peers: allow_block_list::Behaviour::default()
};

Structs§