mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
fixed atts verification (#2527)
This commit is contained in:
parent
0f0510096e
commit
eb626e5834
@ -442,7 +442,7 @@ func VerifyAttestation(beaconState *pb.BeaconState, att *pb.Attestation, verifyS
|
||||
beaconState.Slot-params.BeaconConfig().GenesisSlot,
|
||||
)
|
||||
}
|
||||
if att.Data.Slot+params.BeaconConfig().SlotsPerEpoch <= beaconState.Slot {
|
||||
if att.Data.Slot+params.BeaconConfig().SlotsPerEpoch < beaconState.Slot {
|
||||
return fmt.Errorf(
|
||||
"attestation slot (slot %d) + epoch length (%d) less than current beacon state slot (%d)",
|
||||
att.Data.Slot-params.BeaconConfig().GenesisSlot,
|
||||
|
@ -119,9 +119,9 @@ func (ps *ProposerServer) PendingAttestations(ctx context.Context, req *pb.Pendi
|
||||
beaconState.Slot++
|
||||
|
||||
var attsReadyForInclusion []*pbp2p.Attestation
|
||||
for _, val := range atts {
|
||||
if val.Data.Slot+params.BeaconConfig().MinAttestationInclusionDelay <= beaconState.Slot {
|
||||
attsReadyForInclusion = append(attsReadyForInclusion, val)
|
||||
for _, att := range atts {
|
||||
if att.Data.Slot+params.BeaconConfig().MinAttestationInclusionDelay <= beaconState.Slot {
|
||||
attsReadyForInclusion = append(attsReadyForInclusion, att)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user