Formatting based on review

This commit is contained in:
Peter Šurda 2019-07-11 15:32:00 +02:00
parent 465a276c02
commit 0eb4f46923
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -122,12 +122,14 @@ class Dandelion():
def expire(self):
with self.lock:
deadline = time()
toDelete = [[v.stream, k, v.child]
for k, v in self.hashMap.iteritems()
if v.timeout < deadline]
toDelete = [
[v.stream, k, v.child] for k, v in self.hashMap.iteritems()
if v.timeout < deadline
]
for row in toDelete:
self.removeHash(row[1], 'expiration')
invQueue.put((row[0], row[1], row[2]))
invQueue.put(row)
return toDelete
def reRandomiseStems(self):