mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 08:52:54 +00:00
Fix error
This commit is contained in:
@@ -147,13 +147,19 @@ async fn make_selection_proof<T: SlotClock + 'static, E: EthSpec>(
|
|||||||
// Call the endpoint /eth/v1/validator/beacon_committee_selections
|
// Call the endpoint /eth/v1/validator/beacon_committee_selections
|
||||||
// The middleware should return a full selection proof here
|
// The middleware should return a full selection proof here
|
||||||
beacon_nodes
|
beacon_nodes
|
||||||
.first_success(|beacon_node| async move {
|
.first_success(|beacon_node| {
|
||||||
beacon_node
|
let value = selections.clone();
|
||||||
.post_validator_beacon_committee_selections(&[selections])
|
async move {
|
||||||
.await
|
beacon_node
|
||||||
|
.post_validator_beacon_committee_selections(&[value])
|
||||||
|
.await
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.map_err(Error::FailedToProduceSelectionProof)?
|
.map_err(|e| {
|
||||||
|
Error::FailedToProduceSelectionProof(ValidatorStoreError::Middleware(e.to_string()))
|
||||||
|
})?
|
||||||
|
.data
|
||||||
} else {
|
} else {
|
||||||
validator_store
|
validator_store
|
||||||
.produce_selection_proof(duty.pubkey, duty.slot)
|
.produce_selection_proof(duty.pubkey, duty.slot)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ pub enum Error {
|
|||||||
GreaterThanCurrentEpoch { epoch: Epoch, current_epoch: Epoch },
|
GreaterThanCurrentEpoch { epoch: Epoch, current_epoch: Epoch },
|
||||||
UnableToSignAttestation(AttestationError),
|
UnableToSignAttestation(AttestationError),
|
||||||
UnableToSign(SigningError),
|
UnableToSign(SigningError),
|
||||||
|
Middleware(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<SigningError> for Error {
|
impl From<SigningError> for Error {
|
||||||
|
|||||||
Reference in New Issue
Block a user