mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 04:00:05 +00:00
only advance state in validate aggregate and proof if the epoch has changed between head state and attestation slot (#4474)
This commit is contained in:
parent
2b6a5aaaf9
commit
9d8364bdfa
@ -79,7 +79,8 @@ func (r *Service) validateAggregateAndProof(ctx context.Context, pid peer.ID, ms
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if attSlot > s.Slot {
|
// Only advance state if different epoch as the committee can only change on an epoch transition.
|
||||||
|
if helpers.SlotToEpoch(attSlot) > helpers.SlotToEpoch(s.Slot) {
|
||||||
s, err = state.ProcessSlots(ctx, s, attSlot)
|
s, err = state.ProcessSlots(ctx, s, attSlot)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
traceutil.AnnotateError(span, err)
|
traceutil.AnnotateError(span, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user