Increase peer reputation when found by tracker
This commit is contained in:
parent
49562d43c3
commit
658aace8f1
1 changed files with 2 additions and 2 deletions
|
@ -125,9 +125,9 @@ class Peer(object):
|
||||||
# Found a peer from a source
|
# Found a peer from a source
|
||||||
def found(self, source="other"):
|
def found(self, source="other"):
|
||||||
if source == "tracker":
|
if source == "tracker":
|
||||||
self.reputation += 10
|
self.reputation += 1
|
||||||
elif source == "local":
|
elif source == "local":
|
||||||
self.reputation += 30
|
self.reputation += 3
|
||||||
if source in ("tracker", "local"):
|
if source in ("tracker", "local"):
|
||||||
self.site.peers_recent.appendleft(self)
|
self.site.peers_recent.appendleft(self)
|
||||||
self.time_found = time.time()
|
self.time_found = time.time()
|
||||||
|
|
Loading…
Reference in a new issue