WIP: Reducing invalid peers in addr messages #8

Draft
lee.miller wants to merge 2 commits from lee.miller/MiNode:protocol into v0.3
Showing only changes of commit 90e0dd28f4 - Show all commits

View File

@ -411,6 +411,8 @@ class ConnectionBase(threading.Thread):
addr = message.Addr.from_message(m)
logging.debug('%s:%s -> %s', self.host_print, self.port, addr)
for a in addr.addresses:
if not a.host or a.port == 0:
continue
if (a.host, a.port) not in shared.core_nodes:
shared.unchecked_node_pool.add((a.host, a.port))