mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
Bypass the task_spawner for node/version
This commit is contained in:
@@ -2479,13 +2479,12 @@ pub fn serve<T: BeaconChainTypes>(
|
|||||||
.and(warp::path("node"))
|
.and(warp::path("node"))
|
||||||
.and(warp::path("version"))
|
.and(warp::path("version"))
|
||||||
.and(warp::path::end())
|
.and(warp::path::end())
|
||||||
.and(task_spawner_filter.clone())
|
// Bypass the `task_spawner` since this method returns a static string.
|
||||||
.and_then(|task_spawner: TaskSpawner<T::EthSpec>| {
|
.then(|| async {
|
||||||
task_spawner.blocking_json_task(Priority::P1, move || {
|
warp::reply::json(&api_types::GenericResponse::from(api_types::VersionData {
|
||||||
Ok(api_types::GenericResponse::from(api_types::VersionData {
|
version: version_with_platform(),
|
||||||
version: version_with_platform(),
|
}))
|
||||||
}))
|
.into_response()
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// GET node/syncing
|
// GET node/syncing
|
||||||
|
|||||||
Reference in New Issue
Block a user