Merge branch 'api-alignment' into validator-post-fns

This commit is contained in:
Luke Anderson
2019-09-12 15:12:54 +10:00
6 changed files with 31 additions and 38 deletions

View File

@@ -11,7 +11,8 @@ pub fn get_version(req: Request<Body>) -> ApiResult {
/// Read the genesis time from the current beacon chain state.
pub fn get_genesis_time<T: BeaconChainTypes + 'static>(req: Request<Body>) -> ApiResult {
let (_beacon_chain, head_state) = get_beacon_chain_from_request::<T>(&req)?;
let beacon_chain = get_beacon_chain_from_request::<T>(&req)?;
let head_state = get_head_state(beacon_chain)?;
let gen_time: u64 = head_state.genesis_time;
success_response_2(req, &gen_time)
}