Import target block body during warp sync (#12300)

* Receive and import target block body

* Request target block

* minor: wording

* Check for block body in the test

* Import target block justifications

* Fix: do not fail block validation if no justifications received

* Fix: import target blocks without justifications

Co-authored-by: arkpar <arkady.paronyan@gmail.com>
This commit is contained in:
Dmitry Markin
2022-09-20 18:05:44 +03:00
committed by GitHub
parent 6e424467a2
commit ea1c8bd2db
8 changed files with 211 additions and 31 deletions
@@ -96,6 +96,8 @@ pub enum OnBlockData<Block: BlockT> {
Import(BlockOrigin, Vec<IncomingBlock<Block>>),
/// A new block request needs to be made to the given peer.
Request(PeerId, BlockRequest<Block>),
/// Continue processing events.
Continue,
}
/// Result of [`ChainSync::on_block_justification`].