mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
Blockchain cache pruning strategy (#3395)
* blockchain cache pruning strategy * added some internal docs to cache_pruning_strategy * Update core/client/db/src/cache/mod.rs Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d105d3f3a1
commit
eba6dd73c6
@@ -21,7 +21,6 @@ use std::sync::Arc;
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::Justification;
|
||||
use consensus::well_known_cache_keys;
|
||||
|
||||
use crate::error::{Error, Result};
|
||||
|
||||
@@ -254,3 +253,18 @@ pub fn tree_route<Block: BlockT, F: Fn(BlockId<Block>) -> Result<<Block as Block
|
||||
pivot,
|
||||
})
|
||||
}
|
||||
|
||||
/// A list of all well known keys in the blockchain cache.
|
||||
pub mod well_known_cache_keys {
|
||||
/// The type representing cache keys.
|
||||
pub type Id = consensus::import_queue::CacheKeyId;
|
||||
|
||||
/// A list of authorities.
|
||||
pub const AUTHORITIES: Id = *b"auth";
|
||||
|
||||
/// Current Epoch data.
|
||||
pub const EPOCH: Id = *b"epch";
|
||||
|
||||
/// Changes trie configuration.
|
||||
pub const CHANGES_TRIE_CONFIG: Id = *b"chtr";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user