From 497986716fd69c4ad56d9458892d1a0cfd1de5c8 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Thu, 23 Mar 2023 19:03:14 +0200 Subject: [PATCH] Address review comments part 1. --- beacon_chain/validator_client/sync_committee_service.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/beacon_chain/validator_client/sync_committee_service.nim b/beacon_chain/validator_client/sync_committee_service.nim index 38d0098039..a4c70884f0 100644 --- a/beacon_chain/validator_client/sync_committee_service.nim +++ b/beacon_chain/validator_client/sync_committee_service.nim @@ -406,14 +406,13 @@ proc publishSyncMessagesAndContributions(service: SyncCommitteeServiceRef, debug "Producing contribution and proofs", delay = delay await service.produceAndPublishContributions(slot, beaconBlockRoot, duties) -proc spawnSyncCommitteeTasks(service: SyncCommitteeServiceRef, +proc processSyncCommitteeTasks(service: SyncCommitteeServiceRef, slot: Slot) {.async.} = let vc = service.client duties = vc.getSyncCommitteeDutiesForSlot(slot + 1) timeout = vc.beaconClock.durationToNextSlot() - var future: Future[void] try: await service.publishSyncMessagesAndContributions(slot, duties).wait(timeout) @@ -467,7 +466,7 @@ proc mainLoop(service: SyncCommitteeServiceRef) {.async.} = true else: currentSlot = slot - await service.spawnSyncCommitteeTasks(currentSlot.get()) + await service.processSyncCommitteeTasks(currentSlot.get()) false except CancelledError: debug "Service interrupted"