mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 20:51:05 +00:00
RevertCmd: Expose database params via CLI (#14182)
* RevertCmd: Expose database params via CLI This exposes the database params for the `RevertCmd` via CLI. So, users can use `revert` with ParityDb. * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
error,
|
error,
|
||||||
params::{GenericNumber, PruningParams, SharedParams},
|
params::{DatabaseParams, GenericNumber, PruningParams, SharedParams},
|
||||||
CliConfiguration,
|
CliConfiguration,
|
||||||
};
|
};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
@@ -41,6 +41,10 @@ pub struct RevertCmd {
|
|||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[clap(flatten)]
|
#[clap(flatten)]
|
||||||
pub pruning_params: PruningParams,
|
pub pruning_params: PruningParams,
|
||||||
|
|
||||||
|
#[allow(missing_docs)]
|
||||||
|
#[clap(flatten)]
|
||||||
|
pub database_params: DatabaseParams,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Revert handler for auxiliary data (e.g. consensus).
|
/// Revert handler for auxiliary data (e.g. consensus).
|
||||||
@@ -79,4 +83,8 @@ impl CliConfiguration for RevertCmd {
|
|||||||
fn pruning_params(&self) -> Option<&PruningParams> {
|
fn pruning_params(&self) -> Option<&PruningParams> {
|
||||||
Some(&self.pruning_params)
|
Some(&self.pruning_params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn database_params(&self) -> Option<&DatabaseParams> {
|
||||||
|
Some(&self.database_params)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user