forked from LBRYCommunity/lbry-sdk
lock only when fetching, giving a chance for tip updates
This commit is contained in:
parent
7ad3447598
commit
d2fb7a7151
1 changed files with 2 additions and 2 deletions
|
@ -354,8 +354,8 @@ class Ledger(metaclass=LedgerRegistry):
|
|||
self.headers.chunk_getter = get_chunk
|
||||
|
||||
async def doit():
|
||||
async with self._header_processing_lock:
|
||||
for height in reversed(sorted(self.headers.known_missing_checkpointed_chunks)):
|
||||
for height in reversed(sorted(self.headers.known_missing_checkpointed_chunks)):
|
||||
async with self._header_processing_lock:
|
||||
await self.headers.ensure_chunk_at(height)
|
||||
self._other_tasks.add(doit())
|
||||
await self.update_headers()
|
||||
|
|
Loading…
Reference in a new issue