mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 02:38:02 +00:00
Client::info() no longer returns a Result (#2776)
This commit is contained in:
committed by
Bastian Köcher
parent
53e8ad8728
commit
5df89a8a6f
@@ -134,7 +134,7 @@ impl<S, F, Block> BlockchainHeaderBackend<Block> for Blockchain<S, F> where Bloc
|
||||
}
|
||||
}
|
||||
|
||||
fn info(&self) -> ClientResult<BlockchainInfo<Block>> {
|
||||
fn info(&self) -> BlockchainInfo<Block> {
|
||||
self.storage.info()
|
||||
}
|
||||
|
||||
@@ -223,8 +223,8 @@ pub mod tests {
|
||||
Err(ClientError::Backend("Test error".into()))
|
||||
}
|
||||
|
||||
fn info(&self) -> ClientResult<Info<Block>> {
|
||||
Err(ClientError::Backend("Test error".into()))
|
||||
fn info(&self) -> Info<Block> {
|
||||
panic!("Test error")
|
||||
}
|
||||
|
||||
fn status(&self, _id: BlockId<Block>) -> ClientResult<BlockStatus> {
|
||||
|
||||
@@ -668,8 +668,8 @@ pub mod tests {
|
||||
test_client::LocalExecutor::new(None)
|
||||
);
|
||||
let local_checker = &local_checker as &FetchChecker<Block>;
|
||||
let max = remote_client.info().unwrap().chain.best_number;
|
||||
let max_hash = remote_client.info().unwrap().chain.best_hash;
|
||||
let max = remote_client.info().chain.best_number;
|
||||
let max_hash = remote_client.info().chain.best_hash;
|
||||
|
||||
for (index, (begin, end, key, expected_result)) in test_cases.into_iter().enumerate() {
|
||||
let begin_hash = remote_client.block_hash(begin).unwrap().unwrap();
|
||||
@@ -764,8 +764,8 @@ pub mod tests {
|
||||
test_client::LocalExecutor::new(None)
|
||||
);
|
||||
let local_checker = &local_checker as &FetchChecker<Block>;
|
||||
let max = remote_client.info().unwrap().chain.best_number;
|
||||
let max_hash = remote_client.info().unwrap().chain.best_hash;
|
||||
let max = remote_client.info().chain.best_number;
|
||||
let max_hash = remote_client.info().chain.best_hash;
|
||||
|
||||
let (begin, end, key, _) = test_cases[0].clone();
|
||||
let begin_hash = remote_client.block_hash(begin).unwrap().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user