mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 16:17:59 +00:00
Add db params for export-state CLI command (#10830)
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::{
|
||||
error,
|
||||
params::{BlockNumberOrHash, PruningParams, SharedParams},
|
||||
params::{BlockNumberOrHash, DatabaseParams, PruningParams, SharedParams},
|
||||
CliConfiguration,
|
||||
};
|
||||
use clap::Parser;
|
||||
@@ -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 {
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user