mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Handle AttesterSlashingElectra everywhere in the codebase (#14823)
* Handle `AttesterSlashingElectra` everywhere in the codebase * simplify `TestProcessAttesterSlashings_AppliesCorrectStatus`
This commit is contained in:
@@ -122,18 +122,14 @@ func (v *validator) SubmitAttestation(ctx context.Context, slot primitives.Slot,
|
||||
return
|
||||
}
|
||||
|
||||
// TODO: Extend to Electra
|
||||
phase0Att, ok := indexedAtt.(*ethpb.IndexedAttestation)
|
||||
if ok {
|
||||
// Send the attestation to the beacon node.
|
||||
if err := v.db.SlashableAttestationCheck(ctx, phase0Att, pubKey, signingRoot, v.emitAccountMetrics, ValidatorAttestFailVec); err != nil {
|
||||
log.WithError(err).Error("Failed attestation slashing protection check")
|
||||
log.WithFields(
|
||||
attestationLogFields(pubKey, indexedAtt),
|
||||
).Debug("Attempted slashable attestation details")
|
||||
tracing.AnnotateError(span, err)
|
||||
return
|
||||
}
|
||||
// Send the attestation to the beacon node.
|
||||
if err := v.db.SlashableAttestationCheck(ctx, indexedAtt, pubKey, signingRoot, v.emitAccountMetrics, ValidatorAttestFailVec); err != nil {
|
||||
log.WithError(err).Error("Failed attestation slashing protection check")
|
||||
log.WithFields(
|
||||
attestationLogFields(pubKey, indexedAtt),
|
||||
).Debug("Attempted slashable attestation details")
|
||||
tracing.AnnotateError(span, err)
|
||||
return
|
||||
}
|
||||
|
||||
var aggregationBitfield bitfield.Bitlist
|
||||
|
||||
Reference in New Issue
Block a user