mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 07:17:56 +00:00
DatabaseSource::Auto (#9500)
* implement "auto" database backend in client/db, in progress, #9201 * move fn supports_ref_counting from DatabaseSource enum to Database trait to make it work correctly for all types of dbs * update kvdb_rocksdb to 0.13 and use it's new config feature to properly auto start existing database * tests for auto database reopening * introduce OpenDbError to cleanup opening database error handling and handle case when database is not enabled at the compile time * cargo fmt strings again * cargo fmt strings again * rename DataSettingsSrc to fix test compilation * fix the call to the new kvdb-rocksdb interdace in tests to fix compilation * simplify OpenDbError and make it compile even when paritydb and rocksdb are disabled * cargo fmt * fix compilation without flag with-parity-db * fix unused var compilation warning * support different paths for rocksdb and paritydb in DatabaseSouce::Auto * support "auto" database option in substrate cli * enable Lz4 compression for some of the parity-db colums as per review suggestion * applied review suggestions
This commit is contained in:
@@ -27,7 +27,7 @@ use log::{debug, info};
|
||||
use sc_chain_spec::Extension;
|
||||
use sc_network::config::TransportConfig;
|
||||
use sc_service::{
|
||||
config::{DatabaseConfig, KeystoreConfig, NetworkConfiguration},
|
||||
config::{DatabaseSource, KeystoreConfig, NetworkConfiguration},
|
||||
Configuration, GenericChainSpec, KeepBlocks, Role, RpcHandlers, RpcSession, RuntimeGenesis,
|
||||
TaskManager, TransactionStorageMode,
|
||||
};
|
||||
@@ -83,7 +83,7 @@ where
|
||||
info!("Opening Indexed DB database '{}'...", name);
|
||||
let db = kvdb_memorydb::create(10);
|
||||
|
||||
DatabaseConfig::Custom(sp_database::as_database(db))
|
||||
DatabaseSource::Custom(sp_database::as_database(db))
|
||||
},
|
||||
keystore_remote: Default::default(),
|
||||
keystore: KeystoreConfig::InMemory,
|
||||
|
||||
Reference in New Issue
Block a user