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
+2 -2
View File
@@ -28,7 +28,7 @@ use primitives::{H256, Blake2Hasher, storage::StorageKey};
/// Local client abstraction for the network.
pub trait Client<Block: BlockT>: Send + Sync {
/// Get blockchain info.
fn info(&self) -> Result<ClientInfo<Block>, Error>;
fn info(&self) -> ClientInfo<Block>;
/// Get block status.
fn block_status(&self, id: &BlockId<Block>) -> Result<BlockStatus, Error>;
@@ -81,7 +81,7 @@ impl<B, E, Block, RA> Client<Block> for SubstrateClient<B, E, Block, RA> where
Block: BlockT<Hash=H256>,
RA: Send + Sync
{
fn info(&self) -> Result<ClientInfo<Block>, Error> {
fn info(&self) -> ClientInfo<Block> {
(self as &SubstrateClient<B, E, Block, RA>).info()
}