mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-27 14:09:49 +00:00
Allow passing a custom database when creating the Service (#3957)
* Put the DB configuration in an enum
* Allow passing a custom database to client-db
* Clean-ups in client-db
* Fix client tests
* Fix service tests
* Hopefully fix tests for good this time 😩
* Address review
This commit is contained in:
1 parent
14e4cf9155
commit
2c2bba64a0
10 files changed
+145
-98
No files matched your search
@@ -1871,7 +1871,7 @@ pub(crate) mod tests {
|
||||
use consensus::{BlockOrigin, SelectChain};
|
||||
use test_client::{
|
||||
prelude::*,
|
||||
client_db::{Backend, DatabaseSettings, PruningMode},
|
||||
client_db::{Backend, DatabaseSettings, DatabaseSettingsSrc, PruningMode},
|
||||
runtime::{self, Block, Transfer, RuntimeApi, TestAPI},
|
||||
};
|
||||
|
||||
@@ -2755,11 +2755,13 @@ pub(crate) mod tests {
|
||||
// states
|
||||
let backend = Arc::new(Backend::new(
|
||||
DatabaseSettings {
|
||||
cache_size: None,
|
||||
state_cache_size: 1 << 20,
|
||||
state_cache_child_ratio: None,
|
||||
path: tmp.path().into(),
|
||||
pruning: PruningMode::ArchiveAll,
|
||||
source: DatabaseSettingsSrc::Path {
|
||||
path: tmp.path().into(),
|
||||
cache_size: None,
|
||||
}
|
||||
},
|
||||
u64::max_value(),
|
||||
).unwrap());
|
||||
|
||||
Reference in new issue
Block a user