mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: extend RethCliExt with payload builder (#4022)
This commit is contained in:
@ -15,7 +15,8 @@ use clap::Parser;
|
||||
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
|
||||
use reth::{
|
||||
cli::{
|
||||
ext::{RethCliExt, RethRpcConfig, RethRpcServerArgsExt},
|
||||
config::RethRpcConfig,
|
||||
ext::{RethCliExt, RethNodeCommandExt},
|
||||
Cli,
|
||||
},
|
||||
network::{NetworkInfo, Peers},
|
||||
@ -37,7 +38,7 @@ struct MyRethCliExt;
|
||||
|
||||
impl RethCliExt for MyRethCliExt {
|
||||
/// This tells the reth CLI to install the `txpool` rpc namespace via `RethCliTxpoolExt`
|
||||
type RpcExt = RethCliTxpoolExt;
|
||||
type Node = RethCliTxpoolExt;
|
||||
}
|
||||
|
||||
/// Our custom cli args extension that adds one flag to reth default CLI.
|
||||
@ -48,7 +49,7 @@ struct RethCliTxpoolExt {
|
||||
pub enable_ext: bool,
|
||||
}
|
||||
|
||||
impl RethRpcServerArgsExt for RethCliTxpoolExt {
|
||||
impl RethNodeCommandExt for RethCliTxpoolExt {
|
||||
// This is the entrypoint for the CLI to extend the RPC server with custom rpc namespaces.
|
||||
fn extend_rpc_modules<Conf, Provider, Pool, Network, Tasks, Events>(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user