Client::info() no longer returns a Result (#2776)

This commit is contained in:
Pierre Krieger
2019-06-04 16:09:46 +02:00
committed by Bastian Köcher
parent 53e8ad8728
commit 5df89a8a6f
33 changed files with 235 additions and 274 deletions
@@ -77,10 +77,7 @@ impl<B, E, Block: BlockT<Hash=H256>, RA, PRA, SC> JustificationImport<Block>
type Error = ConsensusError;
fn on_start(&self, link: &::consensus_common::import_queue::Link<Block>) {
let chain_info = match self.inner.info() {
Ok(info) => info.chain,
_ => return,
};
let chain_info = self.inner.info().chain;
// request justifications for all pending changes for which change blocks have already been imported
let authorities = self.authority_set.inner().read();
@@ -320,7 +317,6 @@ where
#[allow(deprecated)]
let best_finalized_number = self.inner.backend().blockchain().info()
.map_err(|e| ConsensusError::ClientImport(e.to_string()))?
.finalized_number;
let canon_number = best_finalized_number.min(median_last_finalized_number);