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
@@ -28,7 +28,7 @@ use sc_consensus::{
};
use sc_service::{
config::{
DatabaseSource, KeepBlocks, KeystoreConfig, NetworkConfiguration, OffchainWorkerConfig,
BlocksPruning, DatabaseSource, KeystoreConfig, NetworkConfiguration, OffchainWorkerConfig,
PruningMode, WasmExecutionMethod, WasmtimeInstantiationStrategy,
},
BasePath, Configuration, Role,
@@ -75,7 +75,7 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
state_cache_size: 67108864,
state_cache_child_ratio: None,
state_pruning: Some(PruningMode::ArchiveAll),
keep_blocks: KeepBlocks::All,
blocks_pruning: BlocksPruning::All,
chain_spec: spec,
wasm_method: WasmExecutionMethod::Compiled {
instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite,
@@ -26,7 +26,7 @@ use node_primitives::AccountId;
use sc_client_api::execution_extensions::ExecutionStrategies;
use sc_service::{
config::{
DatabaseSource, KeepBlocks, KeystoreConfig, NetworkConfiguration, OffchainWorkerConfig,
BlocksPruning, DatabaseSource, KeystoreConfig, NetworkConfiguration, OffchainWorkerConfig,
PruningMode, TransactionPoolOptions, WasmExecutionMethod,
},
BasePath, Configuration, Role,
@@ -69,7 +69,7 @@ fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
state_cache_size: 67108864,
state_cache_child_ratio: None,
state_pruning: Some(PruningMode::ArchiveAll),
keep_blocks: KeepBlocks::All,
blocks_pruning: BlocksPruning::All,
chain_spec: spec,
wasm_method: WasmExecutionMethod::Interpreted,
// NOTE: we enforce the use of the native runtime to make the errors more debuggable