From 0eb4f46923d61d481a2f9f5c87033d6c92ac6a27 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Thu, 11 Jul 2019 15:32:00 +0200 Subject: [PATCH] Formatting based on review --- src/network/dandelion.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/network/dandelion.py b/src/network/dandelion.py index e3464dae..60d84cdf 100644 --- a/src/network/dandelion.py +++ b/src/network/dandelion.py @@ -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):