mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
use clap3 instead of structopt (#10632)
* use clap3 instead of structopt Signed-off-by: koushiro <koushiro.cqx@gmail.com> * format Signed-off-by: koushiro <koushiro.cqx@gmail.com> * update ss58-registry and revert some nits Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix clippy and doc Signed-off-by: koushiro <koushiro.cqx@gmail.com> * update clap to 3.0.7 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Apply review suggestions Signed-off-by: koushiro <koushiro.cqx@gmail.com> * remove useless option long name Signed-off-by: koushiro <koushiro.cqx@gmail.com> * cargo fmt Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
@@ -17,23 +17,23 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::error;
|
||||
use clap::Args;
|
||||
use sc_service::{KeepBlocks, PruningMode, Role};
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// Parameters to define the pruning mode
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct PruningParams {
|
||||
/// Specify the state pruning mode, a number of blocks to keep or 'archive'.
|
||||
///
|
||||
/// Default is to keep all block states if the node is running as a
|
||||
/// validator (i.e. 'archive'), otherwise state is only kept for the last
|
||||
/// 256 blocks.
|
||||
#[structopt(long = "pruning", value_name = "PRUNING_MODE")]
|
||||
#[clap(long, value_name = "PRUNING_MODE")]
|
||||
pub pruning: Option<String>,
|
||||
/// Specify the number of finalized blocks to keep in the database.
|
||||
///
|
||||
/// Default is to keep all blocks.
|
||||
#[structopt(long, value_name = "COUNT")]
|
||||
#[clap(long, value_name = "COUNT")]
|
||||
pub keep_blocks: Option<u32>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user