Check for block parent before verification. (#1714)

* Treat verification errors more seriously

* Track obsolete requests

* Check block parent before verification

* Style
This commit is contained in:
Arkadiy Paronyan
2019-02-07 11:58:27 +01:00
committed by GitHub
parent fb0f4dfb03
commit 1dc15be5bd
8 changed files with 117 additions and 135 deletions
@@ -249,6 +249,14 @@ impl<B, E, Block: BlockT<Hash=H256>, RA, PRA> BlockImport<Block>
Ok(import_result)
}
fn check_block(
&self,
hash: Block::Hash,
parent_hash: Block::Hash,
) -> Result<ImportResult, Self::Error> {
self.inner.check_block(hash, parent_hash)
}
}
impl<B, E, Block: BlockT<Hash=H256>, RA, PRA> GrandpaBlockImport<B, E, Block, RA, PRA> {