mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 15:11:02 +00:00
Companion for new trie cache (#1361)
* Update branch
* Make it compile
* Update Substrate
* Revert "Update branch"
This reverts commit 7b0278160a09312fc6501e0a31923c5a8d8f8c56.
* FMT
* update lockfile for {"polkadot", "substrate"}
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -102,7 +102,7 @@ impl RelayStateSproofBuilder {
|
||||
) -> (polkadot_primitives::v2::Hash, sp_state_machine::StorageProof) {
|
||||
let (db, root) = MemoryDB::<HashFor<polkadot_primitives::v2::Block>>::default_with_root();
|
||||
let state_version = Default::default(); // for test using default.
|
||||
let mut backend = sp_state_machine::TrieBackend::new(db, root);
|
||||
let mut backend = sp_state_machine::TrieBackendBuilder::new(db, root).build();
|
||||
|
||||
let mut relevant_keys = Vec::new();
|
||||
{
|
||||
|
||||
@@ -191,8 +191,8 @@ impl CliConfiguration<Self> for RelayChainCli {
|
||||
self.base.base.transaction_pool(is_dev)
|
||||
}
|
||||
|
||||
fn state_cache_child_ratio(&self) -> CliResult<Option<usize>> {
|
||||
self.base.base.state_cache_child_ratio()
|
||||
fn trie_cache_maximum_size(&self) -> CliResult<Option<usize>> {
|
||||
self.base.base.trie_cache_maximum_size()
|
||||
}
|
||||
|
||||
fn rpc_methods(&self) -> CliResult<sc_service::config::RpcMethods> {
|
||||
|
||||
@@ -650,8 +650,7 @@ pub fn node_config(
|
||||
keystore: KeystoreConfig::InMemory,
|
||||
keystore_remote: Default::default(),
|
||||
database: DatabaseSource::RocksDb { path: root.join("db"), cache_size: 128 },
|
||||
state_cache_size: 67108864,
|
||||
state_cache_child_ratio: None,
|
||||
trie_cache_maximum_size: Some(64 * 1024 * 1024),
|
||||
state_pruning: Some(PruningMode::ArchiveAll),
|
||||
blocks_pruning: BlocksPruning::All,
|
||||
chain_spec: spec,
|
||||
|
||||
Reference in New Issue
Block a user