Skip to content

Commit

Permalink
test push settings every slot
Browse files Browse the repository at this point in the history
  • Loading branch information
james-prysm committed Jun 27, 2024
1 parent 4becd7b commit 5550209
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions validator/client/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,12 @@ func run(ctx context.Context, v iface.Validator) {

// call push proposer setting at the start of each epoch to account for the following edge case:
// proposer is activated at the start of epoch and tries to propose immediately
if slots.IsEpochStart(slot) {
go func() {
// deadline set for 1 epoch from call to not overlap.
epochDeadline := v.SlotDeadline(slot + params.BeaconConfig().SlotsPerEpoch - 1)
if err := v.PushProposerSettings(ctx, km, slot, epochDeadline); err != nil {
log.WithError(err).Warn("Failed to update proposer settings")
}
}()
}

go func() {
if err := v.PushProposerSettings(ctx, km, slot, time.Now().Add(1*time.Minute)); err != nil {
log.WithError(err).Warn("Failed to update proposer settings")
}
}()

// Start fetching domain data for the next epoch.
if slots.IsEpochEnd(slot) {
Expand Down

0 comments on commit 5550209

Please sign in to comment.