mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 17:48:03 -05:00
add DebugApi struct, functions to be implemented (#1000)
This commit is contained in:
41
crates/net/rpc/src/debug.rs
Normal file
41
crates/net/rpc/src/debug.rs
Normal file
@@ -0,0 +1,41 @@
|
||||
use async_trait::async_trait;
|
||||
use jsonrpsee::core::RpcResult as Result;
|
||||
use reth_primitives::{rpc::BlockId, Bytes, H256};
|
||||
use reth_rpc_api::DebugApiServer;
|
||||
use reth_rpc_types::RichBlock;
|
||||
|
||||
/// `debug` API implementation.
|
||||
///
|
||||
/// This type provides the functionality for handling `debug` related requests.
|
||||
pub struct DebugApi {
|
||||
// TODO: add proper handler when implementing functions
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl DebugApiServer for DebugApi {
|
||||
async fn raw_header(&self, _block_id: BlockId) -> Result<Bytes> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn raw_block(&self, _block_id: BlockId) -> Result<Bytes> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn raw_transaction(&self, _hash: H256) -> Result<Bytes> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn raw_receipts(&self, _block_id: BlockId) -> Result<Vec<Bytes>> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn bad_blocks(&self) -> Result<Vec<RichBlock>> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for DebugApi {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("DebugApi").finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
@@ -12,12 +12,14 @@
|
||||
//! Provides the implementation of all RPC interfaces.
|
||||
|
||||
mod admin;
|
||||
mod debug;
|
||||
mod engine;
|
||||
mod eth;
|
||||
mod net;
|
||||
mod web3;
|
||||
|
||||
pub use admin::AdminApi;
|
||||
pub use debug::DebugApi;
|
||||
pub use engine::EngineApi;
|
||||
pub use eth::{EthApi, EthApiSpec, EthPubSub};
|
||||
pub use net::NetApi;
|
||||
|
||||
Reference in New Issue
Block a user