Bypass the task_spawner for node/version

This commit is contained in:
Paul Hauner
2023-07-05 18:46:40 +10:00
parent eb2be2c9eb
commit 8a765938e8

View File

@@ -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