diff --git a/packages/beacon-node/src/chain/validation/attestation.ts b/packages/beacon-node/src/chain/validation/attestation.ts index bfe9e540d9c..f2699c14d57 100644 --- a/packages/beacon-node/src/chain/validation/attestation.ts +++ b/packages/beacon-node/src/chain/validation/attestation.ts @@ -515,25 +515,20 @@ async function validateAttestationNoSignatureCheck( signature, }; - let attestation: SingleAttestation; - if (attestationOrCache.attestation) { - attestation = attestationOrCache.attestation; - } else { - if (!isForkPostElectra(fork)) { - attestation = { - aggregationBits, - data: attData, - signature, - }; - } else { - attestation = { - committeeIndex, - attesterIndex: validatorIndex, - data: attData, - signature, - }; - } - } + const attestation: SingleAttestation = attestationOrCache.attestation + ? attestationOrCache.attestation + : !isForkPostElectra(fork) + ? { + aggregationBits, + data: attData, + signature, + } + : { + committeeIndex, + attesterIndex: validatorIndex, + data: attData, + signature, + }; return { attestation,