Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
RevertCmd: Expose database params via CLI (#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 gpestana committed May 27, 2023
1 parent 8303e41 commit aa50d06
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 aa50d06

Please sign in to comment.