From c8b839fe492833b6b27090daa672352eda3fe373 Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Mon, 2 Sep 2019 16:46:57 +0200 Subject: [PATCH] Removed superflous safety check (#3530) --- substrate/core/client/src/client.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/substrate/core/client/src/client.rs b/substrate/core/client/src/client.rs index 3363424854..eb07116690 100644 --- a/substrate/core/client/src/client.rs +++ b/substrate/core/client/src/client.rs @@ -917,19 +917,6 @@ impl Client 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.