Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions validator_client/validator_services/src/attestation_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ impl<S: ValidatorStore + 'static, T: SlotClock + 'static> AttestationService<S,
// Create and publish an `Attestation` for all validators only once
// as the committee_index is not included in AttestationData post-Electra
let attestation_duties: Vec<_> = self.duties_service.attesters(slot).into_iter().collect();

// Return early if there is no attestation duties
if attestation_duties.is_empty() {
return Ok(());
}

let attestation_service = self.clone();

let attestation_data_handle = self
Expand Down Expand Up @@ -371,10 +377,6 @@ impl<S: ValidatorStore + 'static, T: SlotClock + 'static> AttestationService<S,
&[validator_metrics::ATTESTATIONS],
);

if validator_duties.is_empty() {
return Ok(());
}

let current_epoch = self
.slot_clock
.now()
Expand Down
Loading