diff --git a/substrate/client/cli/src/arg_enums.rs b/substrate/client/cli/src/arg_enums.rs
index 7c9974fff3..6b0a029dd4 100644
--- a/substrate/client/cli/src/arg_enums.rs
+++ b/substrate/client/cli/src/arg_enums.rs
@@ -201,8 +201,10 @@ pub enum Database {
/// ParityDb.
ParityDb,
/// Detect whether there is an existing database. Use it, if there is, if not, create new
- /// instance of paritydb
+ /// instance of ParityDb
Auto,
+ /// ParityDb.
+ ParityDbDeprecated,
}
impl std::str::FromStr for Database {
@@ -212,6 +214,8 @@ impl std::str::FromStr for Database {
if s.eq_ignore_ascii_case("rocksdb") {
Ok(Self::RocksDb)
} else if s.eq_ignore_ascii_case("paritydb-experimental") {
+ Ok(Self::ParityDbDeprecated)
+ } else if s.eq_ignore_ascii_case("paritydb") {
Ok(Self::ParityDb)
} else if s.eq_ignore_ascii_case("auto") {
Ok(Self::Auto)
@@ -224,7 +228,7 @@ impl std::str::FromStr for Database {
impl Database {
/// Returns all the variants of this enum to be shown in the cli.
pub fn variants() -> &'static [&'static str] {
- &["rocksdb", "paritydb-experimental", "auto"]
+ &["rocksdb", "paritydb", "paritydb-experimental", "auto"]
}
}
diff --git a/substrate/client/cli/src/config.rs b/substrate/client/cli/src/config.rs
index a40be77f65..d0f10dc9f6 100644
--- a/substrate/client/cli/src/config.rs
+++ b/substrate/client/cli/src/config.rs
@@ -222,6 +222,13 @@ pub trait CliConfiguration: Sized {
Ok(match database {
Database::RocksDb => DatabaseSource::RocksDb { path: rocksdb_path, cache_size },
Database::ParityDb => DatabaseSource::ParityDb { path: paritydb_path },
+ Database::ParityDbDeprecated => {
+ eprintln!(
+ "WARNING: \"paritydb-experimental\" database setting is deprecated and will be removed in future releases. \
+ Please update your setup to use the new value: \"paritydb\"."
+ );
+ DatabaseSource::ParityDb { path: paritydb_path }
+ },
Database::Auto => DatabaseSource::Auto { paritydb_path, rocksdb_path, cache_size },
})
}