mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 09:08:05 -05:00
chore: add with ext function (#4087)
This commit is contained in:
@@ -159,6 +159,40 @@ pub struct NodeCommand<Ext: RethCliExt = ()> {
|
||||
}
|
||||
|
||||
impl<Ext: RethCliExt> NodeCommand<Ext> {
|
||||
/// Replaces the extension of the node command
|
||||
pub fn with_ext<E: RethCliExt>(self, ext: E::Node) -> NodeCommand<E> {
|
||||
let Self {
|
||||
datadir,
|
||||
config,
|
||||
chain,
|
||||
metrics,
|
||||
network,
|
||||
rpc,
|
||||
txpool,
|
||||
builder,
|
||||
debug,
|
||||
db,
|
||||
dev,
|
||||
pruning,
|
||||
..
|
||||
} = self;
|
||||
NodeCommand {
|
||||
datadir,
|
||||
config,
|
||||
chain,
|
||||
metrics,
|
||||
network,
|
||||
rpc,
|
||||
txpool,
|
||||
builder,
|
||||
debug,
|
||||
db,
|
||||
dev,
|
||||
pruning,
|
||||
ext,
|
||||
}
|
||||
}
|
||||
|
||||
/// Execute `node` command
|
||||
pub async fn execute(mut self, ctx: CliContext) -> eyre::Result<()> {
|
||||
info!(target: "reth::cli", "reth {} starting", SHORT_VERSION);
|
||||
|
||||
Reference in New Issue
Block a user