Skip to content

Commit

Permalink
RevertCmd: Expose database params via CLI (paritytech#14182)
Browse files Browse the repository at this point in the history
* 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 <>
  • Loading branch information
bkchr authored and librelois committed Jun 20, 2023
1 parent a47ab5c commit 1b83b68
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion client/cli/src/commands/revert_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use crate::{
error,
params::{GenericNumber, PruningParams, SharedParams},
params::{DatabaseParams, GenericNumber, PruningParams, SharedParams},
CliConfiguration,
};
use clap::Parser;
Expand All @@ -41,6 +41,10 @@ pub struct RevertCmd {
#[allow(missing_docs)]
#[clap(flatten)]
pub pruning_params: PruningParams,

#[allow(missing_docs)]
#[clap(flatten)]
pub database_params: DatabaseParams,
}

/// Revert handler for auxiliary data (e.g. consensus).
Expand Down Expand Up @@ -79,4 +83,8 @@ impl CliConfiguration for RevertCmd {
fn pruning_params(&self) -> Option<&PruningParams> {
Some(&self.pruning_params)
}

fn database_params(&self) -> Option<&DatabaseParams> {
Some(&self.database_params)
}
}

0 comments on commit 1b83b68

Please sign in to comment.