ignore nodes with port 0, fixes #93 (presumably)

This commit is contained in:
Bora M. Alper 2017-06-10 22:10:33 +03:00
parent ec708db607
commit a083bf40f9

View File

@ -153,6 +153,9 @@ class SybilNode:
except AssertionError:
return
# Ignore nodes with port 0.
nodes = [n for n in nodes if n[1][1] != 0]
# Add new found nodes to the routing table, assuring that we have no more than n_max_neighbours in total.
if len(self._routing_table) < self.__n_max_neighbours:
self._routing_table.update(nodes)