Rename --pruning and --keep-blocks to be more similar to one another (#11934)

* rename prunning and keep-blocks flags

* Add aliases in keep-blocks and pruning for backward compatibility

* Rename in code variables from  and  to  and
This commit is contained in:
Nikos Kontakis
2022-08-08 11:31:26 +02:00
committed by GitHub
parent a314484865
commit 20c49b20a7
16 changed files with 79 additions and 79 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ where
state_cache_child_ratio: config.state_cache_child_ratio.map(|v| (v, 100)),
state_pruning: config.state_pruning.clone(),
source: config.database.clone(),
keep_blocks: config.keep_blocks,
blocks_pruning: config.blocks_pruning,
};
let backend = new_db_backend(db_config)?;
+2 -2
View File
@@ -19,7 +19,7 @@
//! Service configuration.
pub use sc_client_api::execution_extensions::{ExecutionStrategies, ExecutionStrategy};
pub use sc_client_db::{Database, DatabaseSource, KeepBlocks, PruningMode};
pub use sc_client_db::{BlocksPruning, Database, DatabaseSource, PruningMode};
pub use sc_executor::WasmExecutionMethod;
#[cfg(feature = "wasmtime")]
pub use sc_executor::WasmtimeInstantiationStrategy;
@@ -79,7 +79,7 @@ pub struct Configuration {
/// Number of blocks to keep in the db.
///
/// NOTE: only finalized blocks are subject for removal!
pub keep_blocks: KeepBlocks,
pub blocks_pruning: BlocksPruning,
/// Chain configuration.
pub chain_spec: Box<dyn ChainSpec>,
/// Wasm execution method.
+1 -1
View File
@@ -60,7 +60,7 @@ pub use self::{
error::Error,
};
pub use config::{
BasePath, Configuration, DatabaseSource, KeepBlocks, PruningMode, Role, RpcMethods, TaskType,
BasePath, BlocksPruning, Configuration, DatabaseSource, PruningMode, Role, RpcMethods, TaskType,
};
pub use sc_chain_spec::{
ChainSpec, ChainType, Extension as ChainSpecExtension, GenericChainSpec, NoExtension,