Add typedefs for storage types (#4654)

* Add typedefs for storage types

* Fix after merge
This commit is contained in:
Stanislav Tkach
2020-01-17 10:20:20 +02:00
committed by Bastian Köcher
parent 20ce6c120c
commit 482ca522cc
19 changed files with 202 additions and 160 deletions
+4 -4
View File
@@ -24,17 +24,17 @@ use hash_db::Hasher;
use sp_runtime::traits::{Block as BlockT, Header, HasherFor, NumberFor};
use sp_core::hexdisplay::HexDisplay;
use sp_core::storage::ChildInfo;
use sp_state_machine::{backend::Backend as StateBackend, TrieBackend};
use sp_state_machine::{
backend::Backend as StateBackend, TrieBackend, StorageKey, StorageValue,
StorageCollection, ChildStorageCollection,
};
use log::trace;
use sc_client_api::backend::{StorageCollection, ChildStorageCollection};
use std::hash::Hash as StdHash;
use crate::stats::StateUsageStats;
const STATE_CACHE_BLOCKS: usize = 12;
type StorageKey = Vec<u8>;
type ChildStorageKey = (Vec<u8>, Vec<u8>);
type StorageValue = Vec<u8>;
/// Shared canonical state cache.
pub struct Cache<B: BlockT> {