From 1ce8339d9661ac39b9cb4002480e0018e0dabaec Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 21 Sep 2021 17:47:03 +1000 Subject: [PATCH] Make eth1::http functions pub --- beacon_node/eth1/src/http.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/eth1/src/http.rs b/beacon_node/eth1/src/http.rs index 489142377b..e002b77f34 100644 --- a/beacon_node/eth1/src/http.rs +++ b/beacon_node/eth1/src/http.rs @@ -479,7 +479,7 @@ pub async fn send_rpc_request( } /// Accepts an entire HTTP body (as a string) and returns either the `result` field or the `error['message']` field, as a serde `Value`. -fn response_result_or_error(response: &str) -> Result { +pub fn response_result_or_error(response: &str) -> Result { let json = serde_json::from_str::(response) .map_err(|e| RpcError::InvalidJson(e.to_string()))?; @@ -501,7 +501,7 @@ fn response_result_or_error(response: &str) -> Result { /// Therefore, this function is only useful for numbers encoded by the JSON RPC. /// /// E.g., `0x01 == 1` -fn hex_to_u64_be(hex: &str) -> Result { +pub fn hex_to_u64_be(hex: &str) -> Result { u64::from_str_radix(strip_prefix(hex)?, 16) .map_err(|e| format!("Failed to parse hex as u64: {:?}", e)) }