remove BlockchainManagerRequest::Overview

This commit is contained in:
hinto.janai 2024-10-23 16:37:17 -04:00
parent d9787f95ff
commit b42a110c98
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 0 additions and 36 deletions

View file

@ -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:
/// - <https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#sync_info>
/// - <https://github.com/monero-project/monero/blob/master/src/cryptonote_protocol/block_queue.cpp#L178>
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.

View file

@ -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<String, Error> {
let BlockchainManagerResponse::Overview(overview) = blockchain_manager
.ready()
.await?
.call(BlockchainManagerRequest::Overview {
height: u64_to_usize(height),
})
.await?
else {
unreachable!();
};
Ok(overview)
}