Known nodes maximum configurable part 2

This commit is contained in:
Peter Šurda 2017-06-24 12:21:42 +02:00
parent d57b0c55ee
commit 0a79490e2c
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -317,7 +317,7 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
peer = state.Peer(decodedIP, port) peer = state.Peer(decodedIP, port)
if peer in knownnodes.knownNodes[stream] and knownnodes.knownNodes[stream][peer] > seenTime: if peer in knownnodes.knownNodes[stream] and knownnodes.knownNodes[stream][peer] > seenTime:
continue continue
if len(knownnodes.knownNodes[stream]) < 20000: if len(knownnodes.knownNodes[stream]) < BMConfigParser().get("knownnodes", "maxnodes"):
with knownnodes.knownNodesLock: with knownnodes.knownNodesLock:
knownnodes.knownNodes[stream][peer] = seenTime knownnodes.knownNodes[stream][peer] = seenTime
#knownnodes.knownNodes[stream][peer] = seenTime #knownnodes.knownNodes[stream][peer] = seenTime