Rev3175, Make getConnectablePeers return not-connected peers by default

This commit is contained in:
shortcutme 2017-12-19 16:14:13 +01:00
parent c9c1d10ee4
commit 7ee5cbe473
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.6.0" self.version = "0.6.0"
self.rev = 3173 self.rev = 3175
self.argv = argv self.argv = argv
self.action = None self.action = None
self.config_file = "zeronet.conf" self.config_file = "zeronet.conf"

View file

@ -1007,7 +1007,7 @@ class Site(object):
if len(found) >= need_num: if len(found) >= need_num:
break # Found requested number of peers break # Found requested number of peers
if need_num > 5 and need_num < 100 and len(found) < need_num: # Return not that good peers if len(found) < need_num: # Return not that good peers
found = [peer for peer in peers if not peer.key.endswith(":0") and peer.key not in ignore][0:need_num - len(found)] found = [peer for peer in peers if not peer.key.endswith(":0") and peer.key not in ignore][0:need_num - len(found)]
return found return found