mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 21:43:09 +00:00
fix delete
This commit is contained in:
parent
85df9e8a4b
commit
182a0e8de0
10
simulator.py
10
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
|
||||
|
Loading…
Reference in New Issue
Block a user