mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Remove unused endpoint
This commit is contained in:
@@ -42,7 +42,6 @@ use crate::beacon::execution_payload_envelope::{
|
||||
use crate::beacon::pool::*;
|
||||
use crate::light_client::{get_light_client_bootstrap, get_light_client_updates};
|
||||
use crate::utils::{AnyVersionFilter, EthV1Filter};
|
||||
use crate::validator::execution_payload_bid::get_validator_execution_payload_bid;
|
||||
use crate::validator::post_validator_liveness_epoch;
|
||||
use crate::validator::*;
|
||||
use crate::version::beacon_response;
|
||||
@@ -2498,14 +2497,6 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
task_spawner_filter.clone(),
|
||||
);
|
||||
|
||||
// GET validator/execution_payload_bid/
|
||||
let get_validator_execution_payload_bid = get_validator_execution_payload_bid(
|
||||
eth_v1.clone(),
|
||||
chain_filter.clone(),
|
||||
not_while_syncing_filter.clone(),
|
||||
task_spawner_filter.clone(),
|
||||
);
|
||||
|
||||
// GET validator/attestation_data?slot,committee_index
|
||||
let get_validator_attestation_data = get_validator_attestation_data(
|
||||
eth_v1.clone().clone(),
|
||||
@@ -3365,7 +3356,6 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
.uor(get_validator_blocks)
|
||||
.uor(get_validator_blinded_blocks)
|
||||
.uor(get_validator_execution_payload_envelope)
|
||||
.uor(get_validator_execution_payload_bid)
|
||||
.uor(get_validator_attestation_data)
|
||||
.uor(get_validator_aggregate_attestation)
|
||||
.uor(get_validator_sync_committee_contribution)
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
use crate::task_spawner::{Priority, TaskSpawner};
|
||||
use crate::utils::{
|
||||
ChainFilter, EthV1Filter, NotWhileSyncingFilter, ResponseFilter, TaskSpawnerFilter,
|
||||
};
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2::types::Accept;
|
||||
use std::sync::Arc;
|
||||
use tracing::debug;
|
||||
use types::Slot;
|
||||
use warp::{Filter, Rejection};
|
||||
|
||||
// GET validator/execution_payload_bid/
|
||||
#[allow(dead_code)]
|
||||
pub fn get_validator_execution_payload_bid<T: BeaconChainTypes>(
|
||||
eth_v1: EthV1Filter,
|
||||
chain_filter: ChainFilter<T>,
|
||||
not_while_syncing_filter: NotWhileSyncingFilter,
|
||||
task_spawner_filter: TaskSpawnerFilter<T>,
|
||||
) -> ResponseFilter {
|
||||
eth_v1
|
||||
.and(warp::path("validator"))
|
||||
.and(warp::path("execution_payload_bid"))
|
||||
.and(warp::path::param::<Slot>().or_else(|_| async {
|
||||
Err(warp_utils::reject::custom_bad_request(
|
||||
"Invalid slot".to_string(),
|
||||
))
|
||||
}))
|
||||
.and(warp::path::end())
|
||||
.and(warp::header::optional::<Accept>("accept"))
|
||||
.and(not_while_syncing_filter)
|
||||
.and(task_spawner_filter)
|
||||
.and(chain_filter)
|
||||
.then(
|
||||
|slot: Slot,
|
||||
_accept_header: Option<Accept>,
|
||||
not_synced_filter: Result<(), Rejection>,
|
||||
task_spawner: TaskSpawner<T::EthSpec>,
|
||||
_chain: Arc<BeaconChain<T>>| {
|
||||
task_spawner.spawn_async_with_rejection(Priority::P0, async move {
|
||||
debug!(
|
||||
?slot,
|
||||
"Execution payload bid production request from HTTP API"
|
||||
);
|
||||
|
||||
not_synced_filter?;
|
||||
|
||||
todo!()
|
||||
})
|
||||
},
|
||||
)
|
||||
.boxed()
|
||||
}
|
||||
@@ -33,7 +33,6 @@ use types::{
|
||||
use warp::{Filter, Rejection, Reply};
|
||||
use warp_utils::reject::convert_rejection;
|
||||
|
||||
pub mod execution_payload_bid;
|
||||
pub mod execution_payload_envelope;
|
||||
|
||||
/// Uses the `chain.validator_pubkey_cache` to resolve a pubkey to a validator
|
||||
|
||||
Reference in New Issue
Block a user