Site has optional files if any of the peers has hashfield

This commit is contained in:
shortcutme 2017-10-03 14:37:15 +02:00
parent 7eca3f4bc5
commit bfb7392198
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ class ContentDbPlugin(object):
if row["address"].endswith(".onion"):
peer.reputation = peer.reputation / 2 # Onion peers less likely working
num += 1
if num_hashfield:
site.content_manager.has_optional_files = True
site.log.debug("%s peers (%s with hashfield) loaded in %.3fs" % (num, num_hashfield, time.time() - s))
def iteratePeers(self, site):