disable race limiting for now

This commit is contained in:
Victor Shyba 2019-02-08 03:32:38 -03:00
parent 3352e0e4f4
commit af1619ebfb

View file

@ -31,9 +31,10 @@ class BlobDownloader:
return False return False
# if a peer won 3 or more blob races and is active as a downloader, stop the race so bandwidth improves # if a peer won 3 or more blob races and is active as a downloader, stop the race so bandwidth improves
# the safe net side is that any failure will reset the peer score, triggering the race back # the safe net side is that any failure will reset the peer score, triggering the race back
for peer, task in self.active_connections.items(): # TODO: this is a good idea for low bandwidth, but doesnt play nice on high bandwidth
if self.scores.get(peer, 0) >= 0 and self.rounds_won.get(peer, 0) >= 3 and not task.done(): # for peer, task in self.active_connections.items():
return False # if self.scores.get(peer, 0) >= 0 and self.rounds_won.get(peer, 0) >= 3 and not task.done():
# return False
return True return True
async def request_blob_from_peer(self, blob: 'BlobFile', peer: 'KademliaPeer'): async def request_blob_from_peer(self, blob: 'BlobFile', peer: 'KademliaPeer'):