diff --git a/client/cli/src/config.rs b/client/cli/src/config.rs index 969d711..88f8ca0 100644 --- a/client/cli/src/config.rs +++ b/client/cli/src/config.rs @@ -34,7 +34,7 @@ pub use sc_cli::{DatabaseParams, KeystoreParams, SubstrateCli}; use ec_service::{ config::{ BasePath, Configuration, DatabaseConfig, KeystoreConfig, Role, RpcMethods, TaskExecutor, - TransactionPoolOptions, TransactionStorageMode, + TransactionPoolOptions, }, TracingReceiver, }; @@ -125,14 +125,6 @@ pub trait CliConfiguration: Sized { .unwrap_or_default()) } - /// Get the database transaction storage scheme. - fn database_transaction_storage(&self) -> Result { - Ok(self - .database_params() - .map(|x| x.transaction_storage()) - .unwrap_or(TransactionStorageMode::BlockBody)) - } - /// Get the database backend variant. /// /// By default this is retrieved from `DatabaseParams` if it is available. Otherwise its `None`. @@ -333,7 +325,6 @@ pub trait CliConfiguration: Sized { rpc_ws_max_connections: self.rpc_ws_max_connections()?, rpc_cors: self.rpc_cors()?, tracing_targets: self.tracing_targets()?, - transaction_storage: self.database_transaction_storage()?, chain_spec, announce_block: self.announce_block()?, role, diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index ae97013..b22b14e 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -26,7 +26,9 @@ use sc_client_api::{ }; use sc_client_db::{Backend, KeepBlocks, PruningMode}; use sc_keystore::LocalKeystore; -use sc_service::{error::Error, new_db_backend, MallocSizeOfWasm, RpcExtensionBuilder}; +use sc_service::{ + error::Error, new_db_backend, MallocSizeOfWasm, RpcExtensionBuilder, TransactionStorageMode, +}; use ec_client_db::StateKv; use ec_executor::{NativeExecutionDispatch, NativeExecutor, RuntimeInfo}; @@ -162,7 +164,8 @@ pub fn database_settings(config: &Configuration) -> sc_client_db::DatabaseSettin state_pruning: PruningMode::ArchiveAll, source: config.database.clone(), keep_blocks: KeepBlocks::All, - transaction_storage: config.transaction_storage.clone(), + // we only point this StorageChain mode, do not receive BlockBody mode + transaction_storage: TransactionStorageMode::StorageChain, } } diff --git a/client/service/src/config.rs b/client/service/src/config.rs index bf633c4..cfc2349 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -55,8 +55,6 @@ pub struct Configuration { pub state_cache_size: usize, /// Size in percent of cache size dedicated to child tries pub state_cache_child_ratio: Option, - /// Transaction storage scheme. - pub transaction_storage: TransactionStorageMode, /// Chain configuration. pub chain_spec: Box, /// RPC over HTTP binding address. `None` if disabled. diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index c835861..1ce5196 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -36,7 +36,7 @@ pub use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnb pub use sc_service::{ build_network, error, BasePath, BuildNetworkParams, ChainSpec, ChainType, GenericChainSpec, NoopRpcExtensionBuilder, RpcExtensionBuilder, RpcMethods, TaskType, TracingReceiver, - TransactionPoolOptions, TransactionStorageMode, + TransactionPoolOptions, }; use crate::builder::KeystoreContainer;