mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +00:00
Update clap to version 4 (#6128)
* Move clap to 4.0.9
* Remove "deprecated" feature flag
* Convert to default_value_t
* update lockfile for {"substrate"}
* Add group(skip) to avoid naming conflict
* More group(skip)
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -33,11 +33,10 @@ use polkadot_primitives::v2::{
|
||||
};
|
||||
|
||||
use futures::channel::oneshot;
|
||||
|
||||
use rand::distributions::{Bernoulli, Distribution};
|
||||
|
||||
#[derive(clap::ArgEnum, Clone, Copy, Debug, PartialEq)]
|
||||
#[clap(rename_all = "kebab-case")]
|
||||
#[derive(clap::ValueEnum, Clone, Copy, Debug, PartialEq)]
|
||||
#[value(rename_all = "kebab-case")]
|
||||
#[non_exhaustive]
|
||||
pub enum FakeCandidateValidation {
|
||||
Disabled,
|
||||
@@ -50,8 +49,8 @@ pub enum FakeCandidateValidation {
|
||||
}
|
||||
|
||||
/// Candidate invalidity details
|
||||
#[derive(clap::ArgEnum, Clone, Copy, Debug, PartialEq)]
|
||||
#[clap(rename_all = "kebab-case")]
|
||||
#[derive(clap::ValueEnum, Clone, Copy, Debug, PartialEq)]
|
||||
#[value(rename_all = "kebab-case")]
|
||||
pub enum FakeCandidateValidationError {
|
||||
/// Validation outputs check doesn't pass.
|
||||
InvalidOutputs,
|
||||
|
||||
@@ -41,18 +41,18 @@ use crate::{interceptor::*, variants::ReplaceValidationResult};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Debug, clap::Parser)]
|
||||
#[clap(rename_all = "kebab-case")]
|
||||
#[command(rename_all = "kebab-case")]
|
||||
#[allow(missing_docs)]
|
||||
pub struct DisputeAncestorOptions {
|
||||
/// Malicious candidate validation subsystem configuration. When enabled, node PVF execution is skipped
|
||||
/// during backing and/or approval and it's result can by specified by this option and `--fake-validation-error`
|
||||
/// for invalid candidate outcomes.
|
||||
#[clap(long, arg_enum, ignore_case = true, default_value_t = FakeCandidateValidation::BackingAndApprovalInvalid)]
|
||||
#[arg(long, value_enum, ignore_case = true, default_value_t = FakeCandidateValidation::BackingAndApprovalInvalid)]
|
||||
pub fake_validation: FakeCandidateValidation,
|
||||
|
||||
/// Applies only when `--fake-validation` is configured to reject candidates as invalid. It allows
|
||||
/// to specify the exact error to return from the malicious candidate validation subsystem.
|
||||
#[clap(long, arg_enum, ignore_case = true, default_value_t = FakeCandidateValidationError::InvalidOutputs)]
|
||||
#[arg(long, value_enum, ignore_case = true, default_value_t = FakeCandidateValidationError::InvalidOutputs)]
|
||||
pub fake_validation_error: FakeCandidateValidationError,
|
||||
|
||||
/// Determines the percentage of candidates that should be disputed. Allows for fine-tuning
|
||||
|
||||
Reference in New Issue
Block a user