remove BlockchainReadRequest::MinerData

This commit is contained in:
hinto.janai 2024-10-04 16:22:49 -04:00
parent d0888c8cf3
commit aaed13ad69
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
3 changed files with 1 additions and 30 deletions

View file

@ -306,19 +306,3 @@ pub(super) async fn coinbase_tx_sum(
Ok(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)
}

View file

@ -121,7 +121,6 @@ fn map_request(
R::DatabaseSize => database_size(env), R::DatabaseSize => database_size(env),
R::OutputHistogram(input) => output_histogram(env, input), R::OutputHistogram(input) => output_histogram(env, input),
R::CoinbaseTxSum { height, count } => coinbase_tx_sum(env, height, count), 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? */ /* 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 { fn coinbase_tx_sum(env: &ConcreteEnv, height: usize, count: u64) -> ResponseResult {
Ok(BlockchainResponse::CoinbaseTxSum(todo!())) Ok(BlockchainResponse::CoinbaseTxSum(todo!()))
} }
/// [`BlockchainReadRequest::MinerData`]
fn miner_data(env: &ConcreteEnv) -> ResponseResult {
Ok(BlockchainResponse::MinerData(todo!()))
}

View file

@ -12,8 +12,7 @@ use monero_serai::block::Block;
use crate::{ use crate::{
types::{Chain, ExtendedBlockHeader, OutputOnChain, VerifiedBlockInformation}, types::{Chain, ExtendedBlockHeader, OutputOnChain, VerifiedBlockInformation},
AltBlockInformation, ChainId, CoinbaseTxSum, MinerData, OutputHistogramEntry, AltBlockInformation, ChainId, CoinbaseTxSum, OutputHistogramEntry, OutputHistogramInput,
OutputHistogramInput,
}; };
//---------------------------------------------------------------------------------------------------- ReadRequest //---------------------------------------------------------------------------------------------------- ReadRequest
@ -129,9 +128,6 @@ pub enum BlockchainReadRequest {
/// ///
/// TODO: document fields after impl. /// TODO: document fields after impl.
CoinbaseTxSum { height: usize, count: u64 }, CoinbaseTxSum { height: usize, count: u64 },
/// Get the necessary data to create a custom block template.
MinerData,
} }
//---------------------------------------------------------------------------------------------------- WriteRequest //---------------------------------------------------------------------------------------------------- WriteRequest
@ -280,9 +276,6 @@ pub enum BlockchainResponse {
/// Response to [`BlockchainReadRequest::CoinbaseTxSum`]. /// Response to [`BlockchainReadRequest::CoinbaseTxSum`].
CoinbaseTxSum(CoinbaseTxSum), CoinbaseTxSum(CoinbaseTxSum),
/// Response to [`BlockchainReadRequest::MinerData`].
MinerData(MinerData),
//------------------------------------------------------ Writes //------------------------------------------------------ Writes
/// A generic Ok response to indicate a request was successfully handled. /// A generic Ok response to indicate a request was successfully handled.
/// ///