Closed JoshuaKissoon closed 10 years ago
That method stated in the paper is an improvement to save some space; but the complexity of the code for that isn't worth it. It's better we keep things the way they currently are with 160 K-Buckets and keep the code simpler. The extra space used is at max 160 * size(Bucket Class) < 5KB
As defined on page 59 of the paper - when u learns of a new contact, it attempts to insert the contact in the appropriate k-bucket. if that bucket is not full the new contact is simply inserted. Otherwise, if the k-bucket's range includes u's own node ID, then the bucket is split into 2 new buckets, the old contents divided between the two, and the insertion attempt is repeated.
Right now we have initially setup 160 K-Buckets, but this is not the way it should be done.