Fast/warp sync fixes (#10562)

* Fast sync fixes

* Fix gap blocks validation

* Updated test

* Formatting

* Networking test
This commit is contained in:
Arkadiy Paronyan
2022-01-13 16:26:06 +01:00
committed by GitHub
parent 3a88215fca
commit 4d477ea9b4
7 changed files with 126 additions and 32 deletions
@@ -1726,9 +1726,8 @@ where
.block_status(&BlockId::Hash(hash))
.map_err(|e| ConsensusError::ClientImport(e.to_string()))?
{
BlockStatus::InChainWithState | BlockStatus::Queued if !import_existing =>
BlockStatus::InChainWithState | BlockStatus::Queued =>
return Ok(ImportResult::AlreadyInChain),
BlockStatus::InChainWithState | BlockStatus::Queued => {},
BlockStatus::InChainPruned if !import_existing =>
return Ok(ImportResult::AlreadyInChain),
BlockStatus::InChainPruned => {},