mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 19:02:42 +00:00
update if loop
This commit is contained in:
@@ -137,31 +137,30 @@ async fn make_selection_proof<T: SlotClock + 'static, E: EthSpec>(
|
||||
// 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)
|
||||
|
||||
Reference in New Issue
Block a user