Tweak timings

This commit is contained in:
Jim McDonald 2020-11-26 02:37:22 +00:00
parent fd48090007
commit 5b9f103612
No known key found for this signature in database
GPG Key ID: 89CEB61B2AD2A5E7
1 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,9 @@ func (s *Service) HandleHeadEvent(event *api.Event) {
}
s.monitor.BlockDelay(time.Since(s.chainTimeService.StartOfSlot(data.Slot)))
// Kick off attestations for the block's slot immediately.
// We give the block half a second to propagate around the rest of the network before
// kicking off attestations for the block's slot.
time.Sleep(500 * time.Millisecond)
jobName := fmt.Sprintf("Beacon block attestations for slot %d", data.Slot)
if s.scheduler.JobExists(ctx, jobName) {
log.Trace().Uint64("slot", uint64(data.Slot)).Msg("Kicking off attestations for slot early due to receiving relevant block")