mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 08:01:09 +00:00
paritydb support for parachains db. (#4838)
* parity db subsystem without cache and no splitted column * fmt * fix path (auto from parity-db fail) * lru cache for db column with cache * Revert "lru cache for db column with cache" This reverts commit ae177bc5e107a075eff6a21f651218ada6599b74. * Write_lock mutex * theoric code for bridges * revert changes * Revert bridge changes * fix spec_version * update parity db * test purge-db * Use specific ordered collection with paritydb. * Revert "Use specific ordered collection with paritydb." This reverts commit 8b66d0a4ae914cba1af0f44050d45dd6d9327c6b. * fix chain selection tests. * remove patch * fix auto. * Remove useless exists directory method * purge chain without parity-db removal * spellcheck * renamings and filtering. * fix assertion * format * update parity-db and fmt * Auto keep using rocksdb when it exists. * Revert "Auto keep using rocksdb when it exists." This reverts commit cea49b32ae590bdce31fed5c45f3c028ae0c7564. * Update kvdb version.
This commit is contained in:
@@ -22,10 +22,10 @@ use polkadot_node_subsystem::{
|
||||
messages::{ChainApiMessage, ChainSelectionMessage},
|
||||
overseer, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemContext, SubsystemError,
|
||||
};
|
||||
use polkadot_node_subsystem_util::database::Database;
|
||||
use polkadot_primitives::v1::{BlockNumber, ConsensusLog, Hash, Header};
|
||||
|
||||
use futures::{channel::oneshot, future::Either, prelude::*};
|
||||
use kvdb::KeyValueDB;
|
||||
use parity_scale_codec::Error as CodecError;
|
||||
|
||||
use std::{
|
||||
@@ -306,13 +306,13 @@ pub struct Config {
|
||||
/// The chain selection subsystem.
|
||||
pub struct ChainSelectionSubsystem {
|
||||
config: Config,
|
||||
db: Arc<dyn KeyValueDB>,
|
||||
db: Arc<dyn Database>,
|
||||
}
|
||||
|
||||
impl ChainSelectionSubsystem {
|
||||
/// Create a new instance of the subsystem with the given config
|
||||
/// and key-value store.
|
||||
pub fn new(config: Config, db: Arc<dyn KeyValueDB>) -> Self {
|
||||
pub fn new(config: Config, db: Arc<dyn Database>) -> Self {
|
||||
ChainSelectionSubsystem { config, db }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user