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 authored and DemiMarie-parity committed 2019-03-31 19:56:49 -04:00
1 parent 3dfda381d5
commit fbbd79e778
15 files changed
+53 -42

No files matched your search

@@ -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();