Add beacon_block methods to rest api

This commit is contained in:
Paul Hauner
2019-08-14 11:22:43 +10:00
parent 4f98a3985f
commit 2bf0d5c071
3 changed files with 87 additions and 11 deletions

View File

@@ -102,6 +102,8 @@ pub fn start_server<T: BeaconChainTypes + Clone + 'static>(
// Route the request to the correct handler.
let result = match (req.method(), path.as_ref()) {
(&Method::GET, "/beacon/block") => beacon::get_block::<T>(req),
(&Method::GET, "/beacon/block_root") => beacon::get_block_root::<T>(req),
(&Method::GET, "/beacon/latest_finalized_checkpoint") => {
beacon::get_latest_finalized_checkpoint::<T>(req)
}