Don't sync on top of pruned blocks (#2079)

* Don't sync to pruned blocks

* Typo

Co-Authored-By: arkpar <arkady.paronyan@gmail.com>
This commit is contained in:
Arkadiy Paronyan authored and GitHub committed 2019-03-22 16:27:50 +01:00
1 parent 53f40c583d
commit 704d2a49c7
5 files changed
+59 -21

No files matched your search

@@ -109,7 +109,7 @@ impl<S, F, Block> BlockchainHeaderBackend<Block> for Blockchain<S, F> where Bloc
};
// if the header is from future or genesis (we never prune genesis) => return
if number.is_zero() || self.storage.status(BlockId::Number(number))? != BlockStatus::InChain {
if number.is_zero() || self.storage.status(BlockId::Number(number))? == BlockStatus::Unknown {
return Ok(None);
}