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
+3 -3
View File
@@ -297,15 +297,15 @@ impl<Block: BlockT> HeaderBackend<Block> for Blockchain<Block> {
}))
}
fn info(&self) -> error::Result<blockchain::Info<Block>> {
fn info(&self) -> blockchain::Info<Block> {
let storage = self.storage.read();
Ok(blockchain::Info {
blockchain::Info {
best_hash: storage.best_hash,
best_number: storage.best_number,
genesis_hash: storage.genesis_hash,
finalized_hash: storage.finalized_hash,
finalized_number: storage.finalized_number,
})
}
}
fn status(&self, id: BlockId<Block>) -> error::Result<BlockStatus> {