Dedup attestation constructor logic in attester cache

This commit is contained in:
dapplion
2024-06-17 22:17:48 +02:00
parent 2634a1f1a6
commit dec7cff9c7
4 changed files with 39 additions and 43 deletions

View File

@@ -374,9 +374,12 @@ impl<T: SlotClock + 'static, E: EthSpec> AttestationService<T, E> {
}
let mut attestation = match Attestation::<E>::empty_for_signing(
duty.committee_index as usize,
duty.committee_index,
duty.committee_length as usize,
attestation_data.clone(),
attestation_data.slot,
attestation_data.beacon_block_root,
attestation_data.source,
attestation_data.target,
&self.context.eth2_config.spec,
) {
Ok(attestation) => attestation,