1
0

synchronizer: fix rare race where synchronizer could get stuck

This commit is contained in:
SomberNight
2021-03-05 20:46:41 +01:00
parent 34413a9c30
commit 1dbff51fce
4 changed files with 22 additions and 12 deletions

View File

@@ -58,8 +58,9 @@ class SPV(NetworkJobOnDefaultServer):
self.merkle_roots = {} # txid -> merkle root (once it has been verified)
self.requested_merkle = set() # txid set of pending requests
async def _start_tasks(self):
async with self.taskgroup as group:
async def _run_tasks(self, *, taskgroup):
await super()._run_tasks(taskgroup=taskgroup)
async with taskgroup as group:
await group.spawn(self.main)
def diagnostic_name(self):