k-bucket 0.1.0

Kademlia DHT K-bucket implementation as a binary tree
Documentation
1
2
3
4
5
6
7
8
9
10
11
extern crate k_bucket;

use k_bucket::{Contact, KBucket};

// #[test]
// fn adding_contact_places_it_in_root_node() {
//   let bucket = KBucket::new();
//   let contact = Contact::new(b"a");
//   bucket.add(contact);
//   assert_eq!(bucket.root.contacts, vec![contact]);
// }