From 358646cf9bffbd5dcfec44804043a2ea7eacd7b2 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Wed, 19 Feb 2025 22:38:11 +0800 Subject: [PATCH] update if loop --- .../validator_services/src/duties_service.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/validator_client/validator_services/src/duties_service.rs b/validator_client/validator_services/src/duties_service.rs index de695ec0eb..de4eeb2d62 100644 --- a/validator_client/validator_services/src/duties_service.rs +++ b/validator_client/validator_services/src/duties_service.rs @@ -137,31 +137,30 @@ async fn make_selection_proof( // Call the endpoint /eth/v1/validator/beacon_committee_selections // During the call, we submit a partial selection proof in the data field of the POST HTTP endpoint // The end point (middleware) should return a full selection proof - let selections = BeaconCommitteeSelection { - validator_index: duty.validator_idnex, + validator_index: duty.validator_index, slot: duty.slot, selection_proof: validator_store .produce_selection_proof(duty.pubkey, duty.slot) .await - .map_err(Error::FailedToProduceSelectionProof)?; + .map_err(Error::FailedToProduceSelectionProof)? + .into(), }; - beacon_nodes .first_success(|beacon_node| async move { beacon_node - .post_validator_beacon_committee_selections(selections) + .post_validator_beacon_committee_selections(&[selections]) .await }) .await - .map_err(|e| Error::FailedToProduceSelectionProof(e.to_string())) + .map_err(|e| Error::FailedToDownloadAttesters(e.to_string()))? } else { validator_store .produce_selection_proof(duty.pubkey, duty.slot) .await .map_err(Error::FailedToProduceSelectionProof)?; }; - + selection_proof .is_aggregator(duty.committee_length as usize, spec) .map_err(Error::InvalidModulo)