/// Adds a peer. If the peer already exists, it is ignored.
Adds a peer. If the peer already exists, it is ignored.
Adds a peer . If the peer already exists it is ignored .
fn add_peer(&mut self, node_id: NodeId) {
        for x in &self.peers {
            if (*x).get() == node_id.get() {
                return;
            }
        }
        self.peers.push(node_id);
    }
fn add_peer ( & mut self , node_id : NodeId ) { for x in & self . peers { if ( * x ) . get ( ) == node_id . get ( ) { return ; } } self . peers . push ( node_id ) ; }
Adds a peer.
Adds a peer .
&mut self
node_id
NodeId