X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=blobdiff_plain;f=apt_p2p_Khashmir%2Fktable.py;h=864dfe50feaadf1732f3319e46f48d68403efdd9;hp=3e60f5c37d0156e6f51c0f9d3543e689012424f4;hb=742952098988651e561baa30dcde02aeede2eddf;hpb=5e73ae20956e409b7f70ab292af360aa41b49c93 diff --git a/apt_p2p_Khashmir/ktable.py b/apt_p2p_Khashmir/ktable.py index 3e60f5c..864dfe5 100644 --- a/apt_p2p_Khashmir/ktable.py +++ b/apt_p2p_Khashmir/ktable.py @@ -226,6 +226,12 @@ class KTable: n = self.buckets[i].l[it] tstamp = n.lastSeen n.updateLastSeen() + + # Move the node to the end and touch the bucket + del(self.buckets[i].l[it]) + self.buckets[i].l.append(n) + self.buckets[i].touch() + return tstamp def invalidateNode(self, n):