mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Extended API
- Added a /beacon/validators function, to list all validators active in a particular epoch - Moved 'get_genesis_state' function, to align with router. - Added content-type for error responses - Tried adding a cache update call to fix issue getting validator duties (this is WIP)
This commit is contained in:
@@ -54,6 +54,7 @@ impl Into<Response<Body>> for ApiError {
|
||||
};
|
||||
Response::builder()
|
||||
.status(status_code.0)
|
||||
.header("content-type", "text/plain")
|
||||
.body(Body::from(status_code.1))
|
||||
.expect("Response should always be created.")
|
||||
}
|
||||
@@ -160,9 +161,7 @@ pub fn start_server<T: BeaconChainTypes>(
|
||||
helpers::implementation_pending_response(req)
|
||||
}
|
||||
|
||||
(&Method::GET, "/beacon/validators") => {
|
||||
helpers::implementation_pending_response(req)
|
||||
}
|
||||
(&Method::GET, "/beacon/validators") => beacon::get_validators::<T>(req),
|
||||
(&Method::GET, "/beacon/validators/indicies") => {
|
||||
helpers::implementation_pending_response(req)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user