remove nodes that went ignored during iteration
This commit is contained in:
parent
2c13c04f86
commit
562d23df11
1 changed files with 3 additions and 0 deletions
|
@ -160,6 +160,9 @@ class _IterativeFind(object):
|
|||
already_contacted_addresses = {(c.address, c.port) for c in self.already_contacted}
|
||||
to_remove = []
|
||||
for contact in self.shortlist:
|
||||
if self.node.contact_manager.is_ignored((contact.address, contact.port)):
|
||||
to_remove.append(contact) # a contact became bad during iteration
|
||||
continue
|
||||
if (contact.address, contact.port) not in already_contacted_addresses:
|
||||
self.already_contacted.append(contact)
|
||||
to_remove.append(contact)
|
||||
|
|
Loading…
Reference in a new issue