From 182a0e8de09ec521a81075807b3150c1494b713a Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 28 Nov 2006 17:10:49 -0700 Subject: [PATCH] fix delete --- simulator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/simulator.py b/simulator.py index 31335cdd..a93d44d0 100644 --- a/simulator.py +++ b/simulator.py @@ -35,7 +35,7 @@ class Node: while numshares and permuted: pid,node = permuted.pop(0) tried += 1 - last_givento = node + last_givento = pid if node.accept_share(fileid, sharesize): givento.append((pid,node)) numshares -= 1 @@ -132,11 +132,11 @@ class Queen: return permuted def delete(self, fileid): - peers = self.permute_peers(fileid) + permuted = self.permute_peers(fileid) size, tried, last_givento = self.living_files[fileid] - peer = "" - while tried and peer < last_givento: - peer,node = permuted.pop(0) + pid = "" + while tried and pid < last_givento: + pid,node = permuted.pop(0) had_it = node.delete_share(fileid) if had_it: tried -= 1 -- 2.45.2