mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 02:08:02 +00:00
Fix purge-chain and print DB info on startup (#5840)
* purge-chain accepts --db option * print DB info on startup * Small refactoring * Added back &self * Add DatabaseParams for PurgeChain, ImportParams and ExportBlocks * Don't force default value * Remove unused fields * Update client/cli/src/commands/export_blocks_cmd.rs * Fix stuff Co-authored-by: Cecile Tonglet <cecile@parity.io> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -317,6 +317,18 @@ impl DatabaseSettingsSrc {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for DatabaseSettingsSrc {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let name = match self {
|
||||
DatabaseSettingsSrc::RocksDb { .. } => "RocksDb",
|
||||
DatabaseSettingsSrc::ParityDb { .. } => "ParityDb",
|
||||
DatabaseSettingsSrc::SubDb { .. } => "SubDb",
|
||||
DatabaseSettingsSrc::Custom(_) => "Custom",
|
||||
};
|
||||
write!(f, "{}", name)
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod columns {
|
||||
pub const META: u32 = crate::utils::COLUMN_META;
|
||||
pub const STATE: u32 = 1;
|
||||
|
||||
Reference in New Issue
Block a user