Skip to content

Commit

Permalink
Address review comments part 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatfate committed Mar 23, 2023
1 parent 4aa110b commit 6a50b24
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions beacon_chain/validator_client/sync_committee_service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 6a50b24

Please sign in to comment.