Merge branch 'dht_shortlist_without_ignored'
This commit is contained in:
commit
7f6bbc0648
2 changed files with 4 additions and 0 deletions
|
@ -23,6 +23,7 @@ at anytime.
|
|||
### Changed
|
||||
* keep track of failures for DHT peers for up to ten minutes instead of indefinitely
|
||||
* skip ignored peers from iterative lookups instead of blocking the peer who returned them to us too
|
||||
* if a node becomes ignored during an iterative find cycle remove it from the shortlist so that we can't return it as a result nor try to probe it anyway
|
||||
|
||||
### Added
|
||||
*
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue