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:
Stanislav Tkach
2019-04-01 02:56:49 +03:00
committed by DemiMarie-parity
parent 3dfda381d5
commit fbbd79e778
15 changed files with 53 additions and 42 deletions
@@ -27,7 +27,7 @@ use client::backend::Backend;
use client::runtime_api::ApiExt;
use consensus_common::{
BlockImport, Error as ConsensusError, ErrorKind as ConsensusErrorKind,
ImportBlock, ImportResult, JustificationImport,
ImportBlock, ImportResult, JustificationImport, well_known_cache_keys,
};
use fg_primitives::GrandpaApi;
use runtime_primitives::Justification;
@@ -388,7 +388,7 @@ impl<B, E, Block: BlockT<Hash=H256>, RA, PRA> BlockImport<Block>
{
type Error = ConsensusError;
fn import_block(&self, mut block: ImportBlock<Block>, new_cache: HashMap<Vec<u8>, Vec<u8>>)
fn import_block(&self, mut block: ImportBlock<Block>, new_cache: HashMap<well_known_cache_keys::Id, Vec<u8>>)
-> Result<ImportResult, Self::Error>
{
let hash = block.post_header().hash();