Isolate and optimize knownnodes processing #1579

Open
g1itch wants to merge 6 commits from g1itch/knownnodes-opt into v0.6
Showing only changes of commit a57358d80a - Show all commits

View File

@ -149,6 +149,9 @@ class singleCleaner(StoppableThread):
connection.destination.host) connection.destination.host)
# remove peers with same host and other ports from knownnodes # remove peers with same host and other ports from knownnodes
for stream in connection.streams: for stream in connection.streams:
if stream == 0: # FIXME: stream 0 is a protocol violation
knownnodes.decreaseRating(connection.destination)
continue
for node in [ for node in [
node for node in knownnodes.knownNodes[stream] node for node in knownnodes.knownNodes[stream]
if node.host == connection.destination.host if node.host == connection.destination.host