mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-09 20:39:55 +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)
|
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::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!()))
|
|
||||||
}
|
|
||||||
|
|
|
@ -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.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue