Old onion peers less likely working
This commit is contained in:
parent
409841a3cf
commit
6c8a7e3cfa
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ class ContentDbPlugin(object):
|
|||
peer.hashfield.replaceFromString(row["hashfield"])
|
||||
num_hashfield += 1
|
||||
peer.time_added = row["time_added"]
|
||||
peer.reputation = int((time.time() - peer.time_added) / (60 * 60 * 24)) # Older peers has more reputation
|
||||
peer.reputation = int((time.time() - peer.time_added) / (60 * 60 * 24)) # Boost reputation for older peers
|
||||
if row["address"].endswith(".onion"):
|
||||
peer.reputation = peer.reputation / 2 # Onion peers less likely working
|
||||
num += 1
|
||||
site.log.debug("%s peers (%s with hashfield) loaded in %.3fs" % (num, num_hashfield, time.time() - s))
|
||||
|
||||
|
|
Loading…
Reference in a new issue