mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 17:18:08 -05:00
feat: show possible values for reth stage (#872)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -3617,7 +3617,6 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"shellexpand",
|
||||
"strum",
|
||||
"tempfile",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
|
||||
@@ -49,6 +49,5 @@ thiserror = "1.0"
|
||||
tokio = { version = "1.21", features = ["sync", "macros", "rt-multi-thread"] }
|
||||
tokio-stream = "0.1"
|
||||
futures = "0.3.25"
|
||||
strum = "0.24.1"
|
||||
tempfile = { version = "3.3.0" }
|
||||
backon = "0.2.0"
|
||||
|
||||
@@ -20,10 +20,8 @@ use reth_stages::{
|
||||
ExecInput, Stage, StageId, Transaction, UnwindInput,
|
||||
};
|
||||
|
||||
use clap::Parser;
|
||||
use serde::Deserialize;
|
||||
use clap::{Parser, ValueEnum};
|
||||
use std::{net::SocketAddr, sync::Arc};
|
||||
use strum::{AsRefStr, EnumString, EnumVariantNames};
|
||||
use tracing::*;
|
||||
|
||||
/// `reth stage` command
|
||||
@@ -67,6 +65,7 @@ pub struct Command {
|
||||
metrics: Option<SocketAddr>,
|
||||
|
||||
/// The name of the stage to run
|
||||
#[arg(value_enum)]
|
||||
stage: StageEnum,
|
||||
|
||||
/// The height to start at
|
||||
@@ -89,11 +88,7 @@ pub struct Command {
|
||||
network: NetworkOpts,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Debug, Clone, Copy, Eq, PartialEq, AsRefStr, EnumVariantNames, EnumString, Deserialize,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "kebab-case")]
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, ValueEnum)]
|
||||
enum StageEnum {
|
||||
Headers,
|
||||
Bodies,
|
||||
|
||||
Reference in New Issue
Block a user