Prefer connecting to non-onion peers
This commit is contained in:
parent
89e8fd3d3a
commit
c21fe3d23a
2 changed files with 13 additions and 8 deletions
|
@ -130,7 +130,10 @@ class Peer(object):
|
|||
def found(self, source="other"):
|
||||
if self.reputation < 5:
|
||||
if source == "tracker":
|
||||
self.reputation += 1
|
||||
if self.ip.endswith(".onion"):
|
||||
self.reputation += 1
|
||||
else:
|
||||
self.reputation += 2
|
||||
elif source == "local":
|
||||
self.reputation += 3
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue