mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-08 20:09:41 +00:00
remove blockchain write handle, fix docs
This commit is contained in:
parent
e7f052f1d0
commit
2228d4d741
3 changed files with 10 additions and 12 deletions
|
@ -102,17 +102,14 @@ pub struct CupratedRpcHandler {
|
|||
/// Read handle to the blockchain database.
|
||||
pub blockchain_read: BlockchainReadHandle,
|
||||
|
||||
/// Write handle to the blockchain database.
|
||||
pub blockchain_write: BlockchainWriteHandle,
|
||||
|
||||
/// Handle to the blockchain manager.
|
||||
pub blockchain_manager: BlockchainManagerHandle,
|
||||
|
||||
/// Read handle to the transaction pool database.
|
||||
pub txpool_read: TxpoolReadHandle,
|
||||
|
||||
/// Write handle to the transaction pool database.
|
||||
pub txpool_write: TxpoolWriteHandle,
|
||||
/// TODO: handle to txpool service.
|
||||
pub txpool_manager: std::convert::Infallible,
|
||||
}
|
||||
|
||||
impl CupratedRpcHandler {
|
||||
|
@ -120,18 +117,16 @@ impl CupratedRpcHandler {
|
|||
pub const fn new(
|
||||
restricted: bool,
|
||||
blockchain_read: BlockchainReadHandle,
|
||||
blockchain_write: BlockchainWriteHandle,
|
||||
blockchain_manager: BlockchainManagerHandle,
|
||||
txpool_read: TxpoolReadHandle,
|
||||
txpool_write: TxpoolWriteHandle,
|
||||
txpool_manager: std::convert::Infallible,
|
||||
) -> Self {
|
||||
Self {
|
||||
restricted,
|
||||
blockchain_read,
|
||||
blockchain_write,
|
||||
blockchain_manager,
|
||||
txpool_read,
|
||||
txpool_write,
|
||||
txpool_manager,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
//!
|
||||
//! The 2nd allows any caller to send [`WriteRequest`][req_w]s.
|
||||
//!
|
||||
//! The [`BlockchainReadHandle`] can be shared as it is cheaply [`Clone`]able.
|
||||
//!
|
||||
//! Although [`BlockchainWriteHandle`] can also be cloned, there is only 1 place
|
||||
//! in Cuprate that writes (the blockchain manager), so it is passed there and used.
|
||||
//!
|
||||
//! ## Initialization
|
||||
//! The database & thread-pool system can be initialized with [`init()`].
|
||||
//!
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
//!
|
||||
//! The 2nd allows any caller to send [`WriteRequest`][req_w]s.
|
||||
//!
|
||||
//! The `DatabaseReadHandle` can be shared as it is cheaply [`Clone`]able, however,
|
||||
//! the `DatabaseWriteHandle` cannot be cloned. There is only 1 place in Cuprate that
|
||||
//! writes, so it is passed there and used.
|
||||
//! Both the handles are cheaply [`Clone`]able.
|
||||
//!
|
||||
//! ## Initialization
|
||||
//! The database & thread-pool system can be initialized with [`init()`].
|
||||
|
|
Loading…
Reference in a new issue