forked from LBRYCommunity/lbry-sdk
allow running some extra probes for k replacements
This commit is contained in:
parent
b3614d965d
commit
612dbcb2f3
1 changed files with 2 additions and 1 deletions
|
@ -184,11 +184,12 @@ class IterativeFinder:
|
||||||
for index, peer in enumerate(self.active.keys()):
|
for index, peer in enumerate(self.active.keys()):
|
||||||
if index == 0:
|
if index == 0:
|
||||||
log.debug("closest to probe: %s", peer.node_id.hex()[:8])
|
log.debug("closest to probe: %s", peer.node_id.hex()[:8])
|
||||||
|
|
||||||
if peer in self.contacted:
|
if peer in self.contacted:
|
||||||
continue
|
continue
|
||||||
if len(self.running_probes) >= constants.ALPHA:
|
if len(self.running_probes) >= constants.ALPHA:
|
||||||
break
|
break
|
||||||
if index > (constants.K - 1):
|
if index > (constants.K + len(self.running_probes)):
|
||||||
break
|
break
|
||||||
origin_address = (peer.address, peer.udp_port)
|
origin_address = (peer.address, peer.udp_port)
|
||||||
if origin_address in self.exclude:
|
if origin_address in self.exclude:
|
||||||
|
|
Loading…
Reference in a new issue