Refactor BlockImportParams to be non_exhaustive (#4936)

* Refactor BlockImportParams to be non_exhaustive

* Fix cargo check compile
This commit is contained in:
Wei Tang
2020-02-17 10:18:53 +01:00
committed by GitHub
parent 625e963aa2
commit c7b09b642a
16 changed files with 186 additions and 437 deletions
@@ -398,7 +398,7 @@ impl<B, E, Block: BlockT, RA, SC> BlockImport<Block>
mut block: BlockImportParams<Block, Self::Transaction>,
new_cache: HashMap<well_known_cache_keys::Id, Vec<u8>>,
) -> Result<ImportResult, Self::Error> {
let hash = block.post_header().hash();
let hash = block.post_hash();
let number = block.header.number().clone();
// early exit if block already in chain, otherwise the check for