mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 19:32:55 +00:00
Remove old debugging code, fix API fault
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::response_builder::ResponseBuilder;
|
||||
use crate::{ApiError, ApiResult};
|
||||
use crate::ApiResult;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use hyper::{Body, Request};
|
||||
use std::sync::Arc;
|
||||
@@ -11,8 +11,5 @@ pub fn get_fork_choice<T: BeaconChainTypes>(
|
||||
req: Request<Body>,
|
||||
beacon_chain: Arc<BeaconChain<T>>,
|
||||
) -> ApiResult {
|
||||
let json = beacon_chain.fork_choice.as_json().map_err(|e| {
|
||||
ApiError::ServerError(format!("Unable to encode fork choice as JSON: {:?}", e))
|
||||
})?;
|
||||
ResponseBuilder::new(&req)?.body_no_ssz(&json)
|
||||
ResponseBuilder::new(&req)?.body_no_ssz(&*beacon_chain.fork_choice.core_proto_array())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user