pub fn new() -> Bucket {
        let id = NodeId::from([0u8; NODE_ID_LEN]);

        let ip = Ipv4Addr::new(127, 0, 0, 1);
        let addr = SocketAddr::V4(SocketAddrV4::new(ip, 0));

        Bucket {
            nodes: [
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
            ],
        }
    }
/// Create a new Bucket with all Nodes default initialized.
Create a new Bucket with all Nodes default initialized.
Create a new Bucket with all Nodes default initialized .
pub fn new() -> Bucket {
        let id = NodeId::from([0u8; NODE_ID_LEN]);
        let ip = Ipv4Addr::new(127, 0, 0, 1);
        let addr = SocketAddr::V4(SocketAddrV4::new(ip, 0));
        Bucket {
            nodes: [
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
                Node::as_bad(id, addr),
            ],
        }
    }
pub fn new ( ) -> Bucket { let id = NodeId :: from ( [ 0u8 ; NODE_ID_LEN ] ) ; let ip = Ipv4Addr :: new ( 127 , 0 , 0 , 1 ) ; let addr = SocketAddr :: V4 ( SocketAddrV4 :: new ( ip , 0 ) ) ; Bucket { nodes : [ Node :: as_bad ( id , addr ) , Node :: as_bad ( id , addr ) , Node :: as_bad ( id , addr ) , Node :: as_bad ( id , addr ) , Node :: as_bad ( id , addr ) , Node :: as_bad ( id , addr ) , Node :: as_bad ( id , addr ) , Node :: as_bad ( id , addr ) , ] , } }
Create a new Bucket with all Nodes default initialized.
Create a new Bucket with all Nodes default initialized .