diff --git a/bin/reth/src/node/mod.rs b/bin/reth/src/node/mod.rs index 397fce91f142..65657b71ff68 100644 --- a/bin/reth/src/node/mod.rs +++ b/bin/reth/src/node/mod.rs @@ -159,6 +159,40 @@ pub struct NodeCommand { } impl NodeCommand { + /// Replaces the extension of the node command + pub fn with_ext(self, ext: E::Node) -> NodeCommand { + 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);