Improve comments for http_server

This commit is contained in:
Paul Hauner 2019-05-27 12:56:09 +10:00
parent 255590ef3b
commit 3a65f84b12
No known key found for this signature in database
GPG Key ID: 5E2CFF9B75FA63DF
3 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@ use router::Router;
use serde_json::json;
use std::sync::Arc;
/// Yields a handler for the HTTP API.
pub fn build_handler<T: BeaconChainTypes + 'static>(
beacon_chain: Arc<BeaconChain<T>>,
) -> impl Handler {

View File

@ -87,7 +87,7 @@ pub fn start_service<T: BeaconChainTypes + 'static>(
info!(log, "HTTP server shutting down");
if let Ok(mut server) = server_start_result {
// According to the documentation, this function "doesn't work" and the server
// According to the documentation, `server.close()` "doesn't work" and the server
// keeps listening.
//
// It is being called anyway, because it seems like the right thing to do. If you

View File

@ -8,6 +8,7 @@ use slot_clock::SlotClock;
use std::sync::Arc;
use types::Slot;
/// Yields a handler for the metrics endpoint.
pub fn build_handler<T: BeaconChainTypes + 'static>(
beacon_chain: Arc<BeaconChain<T>>,
) -> impl Handler {