Add comment for reputation

This commit is contained in:
shortcutme 2018-02-08 18:15:32 +01:00
parent 6376f7dd56
commit 3904dcda39
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ 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)) # Boost reputation for older peers
peer.reputation = int((time.time() - peer.time_added) / (60 * 60 * 24)) # Boost reputation for older peers (1 point for every day)
if row["address"].endswith(".onion"):
peer.reputation = peer.reputation / 2 # Onion peers less likely working
num += 1