Update HTTP API docs (#1010)

This commit is contained in:
Age Manning
2020-04-16 20:31:43 +10:00
committed by GitHub
parent 6a21c9ba6f
commit 6edb4f655c
22 changed files with 2046 additions and 1781 deletions

View File

@@ -0,0 +1,13 @@
//! This contains a collection of lighthouse specific HTTP endpoints.
use crate::response_builder::ResponseBuilder;
use crate::ApiResult;
use eth2_libp2p::NetworkGlobals;
use hyper::{Body, Request};
use std::sync::Arc;
use types::EthSpec;
/// The syncing state of the beacon node.
pub fn syncing<T: EthSpec>(req: Request<Body>, network: Arc<NetworkGlobals<T>>) -> ApiResult {
ResponseBuilder::new(&req)?.body_no_ssz(&network.sync_state())
}