mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
Use [u8; 4] for well known cache keys (#2152)
* Use [u8; 4] for well known cache keys * Use type alias
This commit is contained in:
committed by
DemiMarie-parity
parent
3dfda381d5
commit
fbbd79e778
@@ -23,6 +23,7 @@ use runtime_primitives::{generic::BlockId, Justification, StorageOverlay, Childr
|
||||
use runtime_primitives::traits::{Block as BlockT, NumberFor};
|
||||
use state_machine::backend::Backend as StateBackend;
|
||||
use state_machine::ChangesTrieStorage as StateChangesTrieStorage;
|
||||
use consensus::well_known_cache_keys;
|
||||
use hash_db::Hasher;
|
||||
use trie::MemoryDB;
|
||||
|
||||
@@ -75,7 +76,7 @@ pub trait BlockImportOperation<Block, H> where
|
||||
) -> error::Result<()>;
|
||||
|
||||
/// Update cached data.
|
||||
fn update_cache(&mut self, cache: HashMap<Vec<u8>, Vec<u8>>);
|
||||
fn update_cache(&mut self, cache: HashMap<well_known_cache_keys::Id, Vec<u8>>);
|
||||
/// Inject storage data into the database.
|
||||
fn update_db_storage(&mut self, update: <Self::State as StateBackend<H>>::Transaction) -> error::Result<()>;
|
||||
/// Inject storage data into the database replacing any existing data.
|
||||
|
||||
Reference in New Issue
Block a user