mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-08 20:09:41 +00:00
remove BlockchainReadRequest::MinerData
This commit is contained in:
parent
d0888c8cf3
commit
aaed13ad69
3 changed files with 1 additions and 30 deletions
|
@ -306,19 +306,3 @@ pub(super) async fn coinbase_tx_sum(
|
|||
|
||||
Ok(sum)
|
||||
}
|
||||
|
||||
/// [`BlockchainReadRequest::MinerData`]
|
||||
pub(super) async fn miner_data(
|
||||
mut blockchain_read: BlockchainReadHandle,
|
||||
) -> Result<MinerData, Error> {
|
||||
let BlockchainResponse::MinerData(data) = blockchain_read
|
||||
.ready()
|
||||
.await?
|
||||
.call(BlockchainReadRequest::MinerData)
|
||||
.await?
|
||||
else {
|
||||
unreachable!();
|
||||
};
|
||||
|
||||
Ok(data)
|
||||
}
|
||||
|
|
|
@ -121,7 +121,6 @@ fn map_request(
|
|||
R::DatabaseSize => database_size(env),
|
||||
R::OutputHistogram(input) => output_histogram(env, input),
|
||||
R::CoinbaseTxSum { height, count } => coinbase_tx_sum(env, height, count),
|
||||
R::MinerData => miner_data(env),
|
||||
}
|
||||
|
||||
/* SOMEDAY: post-request handling, run some code for each request? */
|
||||
|
@ -649,8 +648,3 @@ fn output_histogram(env: &ConcreteEnv, input: OutputHistogramInput) -> ResponseR
|
|||
fn coinbase_tx_sum(env: &ConcreteEnv, height: usize, count: u64) -> ResponseResult {
|
||||
Ok(BlockchainResponse::CoinbaseTxSum(todo!()))
|
||||
}
|
||||
|
||||
/// [`BlockchainReadRequest::MinerData`]
|
||||
fn miner_data(env: &ConcreteEnv) -> ResponseResult {
|
||||
Ok(BlockchainResponse::MinerData(todo!()))
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@ use monero_serai::block::Block;
|
|||
|
||||
use crate::{
|
||||
types::{Chain, ExtendedBlockHeader, OutputOnChain, VerifiedBlockInformation},
|
||||
AltBlockInformation, ChainId, CoinbaseTxSum, MinerData, OutputHistogramEntry,
|
||||
OutputHistogramInput,
|
||||
AltBlockInformation, ChainId, CoinbaseTxSum, OutputHistogramEntry, OutputHistogramInput,
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------- ReadRequest
|
||||
|
@ -129,9 +128,6 @@ pub enum BlockchainReadRequest {
|
|||
///
|
||||
/// TODO: document fields after impl.
|
||||
CoinbaseTxSum { height: usize, count: u64 },
|
||||
|
||||
/// Get the necessary data to create a custom block template.
|
||||
MinerData,
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------- WriteRequest
|
||||
|
@ -280,9 +276,6 @@ pub enum BlockchainResponse {
|
|||
/// Response to [`BlockchainReadRequest::CoinbaseTxSum`].
|
||||
CoinbaseTxSum(CoinbaseTxSum),
|
||||
|
||||
/// Response to [`BlockchainReadRequest::MinerData`].
|
||||
MinerData(MinerData),
|
||||
|
||||
//------------------------------------------------------ Writes
|
||||
/// A generic Ok response to indicate a request was successfully handled.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue