Revert "[#2848|Core] Fix incorrect share ratio in torrent status"

This reverts commit 7b87a93862.

After further discussion in the ticket this change is undesired.

> I wrongly assumed that private trackers will count how many bytes you
> download but they don't, they track how many parts(or chunks?) you
> have, when you announce it. So using total_done is fine, no change
> needed.

> Checking for private flag and using total_wanted_done for public
> enables users to be a bit more selfish. They can start a torrent,
> let it run for a bit then deselect the files they don't want and
> only upload enough to make up for what they wanted to download. This
> means they may upload less than they downloaded, hurting the swarm.
> So I personally don't think this would be a good change.
> Overall my suggestion is to close this as not a bug.
This commit is contained in:
Calum Lind 2017-10-29 12:36:15 +00:00
parent 53f818e176
commit 0ba87b424c
1 changed files with 1 additions and 1 deletions

View File

@ -716,7 +716,7 @@ class Torrent(object):
""" """
if self.status.total_done > 0: if self.status.total_done > 0:
return self.status.all_time_upload / self.status.total_wanted_done return self.status.all_time_upload / self.status.total_done
else: else:
return -1.0 return -1.0