Bugfix: proposer-settings edge case for activating validators (#12671)

This commit is contained in:
james-prysm 2023-07-27 11:45:16 -05:00 committed by GitHub
parent a44c209be0
commit e449724034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,8 +108,9 @@ func run(ctx context.Context, v iface.Validator) {
continue
}
// create call on a separate thread to push proposer settings from the middle of an epoch.
if slots.SinceEpochStarts(slot) == params.BeaconConfig().SlotsPerEpoch/2 && v.ProposerSettings() != nil {
// 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) && v.ProposerSettings() != nil {
go func() {
// deadline set for 1 epoch from call to not overlap.
epochDeadline := v.SlotDeadline(slot + params.BeaconConfig().SlotsPerEpoch - 1)