forked from LBRYCommunity/lbry-sdk
check that the stored blob is at least 1 prefix byte close to peer id
This commit is contained in:
parent
dd5b9ca81b
commit
461687ffb4
1 changed files with 2 additions and 1 deletions
|
@ -413,7 +413,8 @@ class BackgroundDownloaderComponent(Component):
|
|||
self.space_available = await self.space_manager.get_free_space_mb(True)
|
||||
if not self.is_busy and self.space_available > 10:
|
||||
blob_hash = next((key.hex() for key in self.dht_node.stored_blob_hashes if
|
||||
key.hex() not in self.blob_manager.completed_blob_hashes), None)
|
||||
key[0] == self.dht_node.protocol.node_id[0]
|
||||
and key.hex() not in self.blob_manager.completed_blob_hashes), None)
|
||||
if blob_hash:
|
||||
self.ongoing_download = asyncio.create_task(self.background_downloader.download_blobs(blob_hash))
|
||||
await asyncio.sleep(self.download_loop_delay_seconds)
|
||||
|
|
Loading…
Reference in a new issue