mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 05:07:12 +00:00
code fmt
This commit is contained in:
@@ -16,7 +16,7 @@ pub fn inclusion_list_duties<T: BeaconChainTypes>(
|
||||
.epoch()
|
||||
// TODO(focil) unwrap
|
||||
.unwrap();
|
||||
// .map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
// .map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
|
||||
// Determine what the current epoch would be if we fast-forward our system clock by
|
||||
// `MAXIMUM_GOSSIP_CLOCK_DISPARITY`.
|
||||
@@ -39,7 +39,7 @@ pub fn inclusion_list_duties<T: BeaconChainTypes>(
|
||||
.validator_inclusion_list_duties(request_indices, request_epoch, head_block_root)
|
||||
// TODO(focil) unwrap
|
||||
.unwrap();
|
||||
//.map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
//.map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
convert_to_api_response(duties, request_indices, dependent_root, chain)
|
||||
} else if request_epoch > current_epoch + 1 {
|
||||
Err(warp_utils::reject::custom_bad_request(format!(
|
||||
@@ -79,7 +79,7 @@ fn convert_to_api_response<T: BeaconChainTypes>(
|
||||
.validator_pubkey_bytes_many(&usize_indices)
|
||||
// TODO(focil) unwrap
|
||||
.unwrap();
|
||||
// .map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
// .map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
|
||||
let data = duties
|
||||
.into_iter()
|
||||
|
||||
@@ -89,8 +89,8 @@ use types::{
|
||||
AttesterSlashing, BeaconStateError, ChainSpec, CommitteeCache, ConfigAndPreset, Epoch, EthSpec,
|
||||
ForkName, ForkVersionedResponse, Hash256, ProposerPreparationData, ProposerSlashing,
|
||||
RelativeEpoch, SignedAggregateAndProof, SignedBlindedBeaconBlock, SignedBlsToExecutionChange,
|
||||
SignedContributionAndProof, SignedValidatorRegistrationData, SignedVoluntaryExit, Slot,
|
||||
SyncCommitteeMessage, SyncContributionData, SignedInclusionList
|
||||
SignedContributionAndProof, SignedInclusionList, SignedValidatorRegistrationData,
|
||||
SignedVoluntaryExit, Slot, SyncCommitteeMessage, SyncContributionData,
|
||||
};
|
||||
use validator::pubkey_to_validator_index;
|
||||
use version::{
|
||||
@@ -3588,11 +3588,9 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
task_spawner.spawn_async_with_rejection(Priority::P0, async move {
|
||||
not_synced_filter?;
|
||||
|
||||
let current_slot = chain
|
||||
.slot()
|
||||
.unwrap();
|
||||
// TODO(focil) unwrap
|
||||
// .map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
let current_slot = chain.slot().unwrap();
|
||||
// TODO(focil) unwrap
|
||||
// .map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
|
||||
// allow a tolerance of one slot to account for clock skew
|
||||
//
|
||||
@@ -3610,7 +3608,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
.map(api_types::GenericResponse::from)
|
||||
// TODO(focil) unwrap
|
||||
.unwrap();
|
||||
// .map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
// .map_err(warp_utils::reject::beacon_chain_error)?;
|
||||
Ok::<_, warp::reject::Rejection>(warp::reply::json(&data).into_response())
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user