Fix unexpected block proposal cancellation. (#4367)

This commit is contained in:
Eugene Kabanov 2022-11-28 23:00:44 +02:00 committed by GitHub
parent cf58fa9573
commit 07885a7210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -439,12 +439,4 @@ proc waitForBlockPublished*(vc: ValidatorClientRef, slot: Slot) {.async.} =
res.add(task.future)
res
if len(pendingTasks) > 0:
try:
await allFutures(pendingTasks)
except CancelledError as exc:
var pending: seq[Future[void]]
for future in pendingTasks:
if not(future.finished()):
pending.add(future.cancelAndWait())
await allFutures(pending)
raise exc
await allFutures(pendingTasks)