Merge branch 'electra-engine-api' of https://github.com/sigp/lighthouse into beacon-api-electra

This commit is contained in:
realbigsean
2024-05-24 11:00:14 -04:00
111 changed files with 2277 additions and 1684 deletions

View File

@@ -2127,14 +2127,7 @@ pub fn serve<T: BeaconChainTypes>(
task_spawner: TaskSpawner<T::EthSpec>,
eth1_service: eth1::Service| {
task_spawner.blocking_response_task(Priority::P1, move || match accept_header {
Some(api_types::Accept::Json) | None => {
let snapshot = eth1_service.get_deposit_snapshot();
Ok(
warp::reply::json(&api_types::GenericResponse::from(snapshot))
.into_response(),
)
}
_ => eth1_service
Some(api_types::Accept::Ssz) => eth1_service
.get_deposit_snapshot()
.map(|snapshot| {
Response::builder()
@@ -2160,6 +2153,13 @@ pub fn serve<T: BeaconChainTypes>(
))
})
}),
_ => {
let snapshot = eth1_service.get_deposit_snapshot();
Ok(
warp::reply::json(&api_types::GenericResponse::from(snapshot))
.into_response(),
)
}
})
},
);