From b42a110c98de6f6847849ab07a8227d75ac7476c Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Wed, 23 Oct 2024 16:37:17 -0400 Subject: [PATCH] remove `BlockchainManagerRequest::Overview` --- binaries/cuprated/src/rpc/handler.rs | 17 ----------------- .../src/rpc/request/blockchain_manager.rs | 19 ------------------- 2 files changed, 36 deletions(-) diff --git a/binaries/cuprated/src/rpc/handler.rs b/binaries/cuprated/src/rpc/handler.rs index 13e8924..eb9ffe7 100644 --- a/binaries/cuprated/src/rpc/handler.rs +++ b/binaries/cuprated/src/rpc/handler.rs @@ -97,20 +97,6 @@ pub enum BlockchainManagerRequest { /// The address that will receive the coinbase reward. wallet_address: String, }, - - /// Get a visual [`String`] overview of blockchain progress. - /// - /// This is a highly implementation specific format used by - /// `monerod` in the `sync_info` RPC call's `overview` field; - /// it is essentially an ASCII visual of blocks. - /// - /// See also: - /// - - /// - - Overview { - /// TODO: the current blockchain height? do we need to pass this? - height: usize, - }, } /// TODO: use real type when public. @@ -157,9 +143,6 @@ pub enum BlockchainManagerResponse { /// The new top height. (TODO: is this correct?) height: usize, }, - - /// Response to [`BlockchainManagerRequest::Overview`] - Overview(String), } /// TODO: use real type when public. diff --git a/binaries/cuprated/src/rpc/request/blockchain_manager.rs b/binaries/cuprated/src/rpc/request/blockchain_manager.rs index ce499e9..a2c5e6b 100644 --- a/binaries/cuprated/src/rpc/request/blockchain_manager.rs +++ b/binaries/cuprated/src/rpc/request/blockchain_manager.rs @@ -214,22 +214,3 @@ pub(crate) async fn generate_blocks( Ok((blocks, usize_to_u64(height))) } - -/// [`BlockchainManagerRequest::Overview`] -pub(crate) async fn overview( - blockchain_manager: &mut BlockchainManagerHandle, - height: u64, -) -> Result { - let BlockchainManagerResponse::Overview(overview) = blockchain_manager - .ready() - .await? - .call(BlockchainManagerRequest::Overview { - height: u64_to_usize(height), - }) - .await? - else { - unreachable!(); - }; - - Ok(overview) -}