Don't update expired node if have enough nodes in that stream
This commit is contained in:
parent
ffd4c3a867
commit
fd8477c3be
|
@ -138,6 +138,9 @@ def addKnownNode(stream, peer, lastseen=None, is_self=False):
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
# don't update expired node if have enough nodes in that stream
|
||||||
|
if len(knownNodes[stream]) > 64:
|
||||||
|
return
|
||||||
rating = -0.2
|
rating = -0.2
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
Reference in New Issue
Block a user