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

Commit

Permalink
Add db params for export-state CLI command (#10830)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkpar authored Feb 9, 2022
1 parent e9d79da commit 3aecef7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/cli/src/commands/export_blocks_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl ExportBlocksCmd {
C: BlockBackend<B> + UsageProvider<B> + 'static,
<<B::Header as HeaderT>::Number as FromStr>::Err: Debug,
{
if let DatabaseSource::RocksDb { ref path, .. } = database_config {
if let Some(path) = database_config.path() {
info!("DB path: {}", path.display());
}

Expand Down
10 changes: 9 additions & 1 deletion client/cli/src/commands/export_state_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

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

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

impl ExportStateCmd {
Expand Down Expand Up @@ -81,4 +85,8 @@ impl CliConfiguration for ExportStateCmd {
fn pruning_params(&self) -> Option<&PruningParams> {
Some(&self.pruning_params)
}

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

0 comments on commit 3aecef7

Please sign in to comment.