/// The method adds the node with the given node ID.
The method adds the node with the given node ID.
The method adds the node with the given node ID .
fn add_node(&self, node_id: NodeId, buffer: usize) {
        let mut send_map = self.send_map.write().unwrap();
        if let std::collections::btree_map::Entry::Vacant(e) = send_map.entry(node_id) {
            let (send, recv) = channel(max(1, buffer));
            e.insert(send);
            self.management_command_sender
                .send(ManagementCommands::AddPeer(node_id, recv))
                .expect("Failed to send ManagementCommands::AddPeer command");
        }
    }
fn add_node ( & self , node_id : NodeId , buffer : usize ) { let mut send_map = self . send_map . write ( ) . unwrap ( ) ; if let std :: collections :: btree_map :: Entry :: Vacant ( e ) = send_map . entry ( node_id ) { let ( send , recv ) = channel ( max ( 1 , buffer ) ) ; e . insert ( send ) ; self . management_command_sender . send ( ManagementCommands :: AddPeer ( node_id , recv ) ) . expect ( " " ) ; } }
The method adds the node with the given node ID.
The method adds the node with the given node ID .
&self
node_id
NodeId
buffer
usize