Limit peer reputation increase from tracker
This commit is contained in:
parent
f0f9b93694
commit
12d494bf38
1 changed files with 6 additions and 4 deletions
|
@ -124,10 +124,12 @@ class Peer(object):
|
|||
|
||||
# Found a peer from a source
|
||||
def found(self, source="other"):
|
||||
if self.reputation < 5:
|
||||
if source == "tracker":
|
||||
self.reputation += 1
|
||||
elif source == "local":
|
||||
self.reputation += 3
|
||||
|
||||
if source in ("tracker", "local"):
|
||||
self.site.peers_recent.appendleft(self)
|
||||
self.time_found = time.time()
|
||||
|
|
Loading…
Reference in a new issue