pub trait PeersInfo: Send + Sync {
// Required methods
fn num_connected_peers(&self) -> usize;
fn local_node_record(&self) -> NodeRecord;
fn local_enr(&self) -> Enr<SecretKey>;
}
Expand description
Provides general purpose information about Peers in the network.
Required Methods§
Sourcefn num_connected_peers(&self) -> usize
fn num_connected_peers(&self) -> usize
Returns how many peers the network is currently connected to.
Note: this should only include established connections and not ongoing attempts.
Sourcefn local_node_record(&self) -> NodeRecord
fn local_node_record(&self) -> NodeRecord
Returns the Ethereum Node Record of the node.