Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Removed superflous safety check (#3530)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkpar authored and bkchr committed Sep 2, 2019
1 parent a91ba84 commit d2e7d66
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions core/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,19 +917,6 @@ impl<B, E, Block, RA> Client<B, E, Block, RA> where
return Err(error::Error::NotInFinalizedChain);
}

// find tree route from last finalized to given block.
let route_from_finalized = crate::blockchain::tree_route(
|id| self.header(&id)?.ok_or_else(|| Error::UnknownBlock(format!("{:?}", id))),
BlockId::Hash(info.finalized_hash),
BlockId::Hash(parent_hash),
)?;

// the block being imported retracts the last finalized block, refusing to
// import.
if !route_from_finalized.retracted().is_empty() {
return Err(error::Error::NotInFinalizedChain);
}

// this is a fairly arbitrary choice of where to draw the line on making notifications,
// but the general goal is to only make notifications when we are already fully synced
// and get a new chain head.
Expand Down

0 comments on commit d2e7d66

Please sign in to comment.