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 b2a7292d21 - Show all commits

View File

@ -161,7 +161,10 @@ def addKnownNode(stream, peer, lastseen=None, is_self=False):
if stream == prev['stream']:
if lastseen - prev['lastseen'] > 3600 * 24:
# more than a day ago, this should be port change
try:
del knownNodes[stream][Peer(peer.host, prev['port'])]
except KeyError:
pass
outages[peer.host]['port'] = peer.port
else:
rating = -0.2