Replace error-chain for client error (#2231)

* WIP: convert client error

* Remove error_chain for client error

* Ignore tx-pool error deprecation warning

* Update Cargo.lock files

* Fix tests

* Increment impl_version

* Derive From impls, remove allow(missing_docs)

* Remove space

* Remove redundant into()s

* Blockchain Error source

* Bump impl version
This commit is contained in:
Andrew Jones
2019-04-11 20:33:43 +01:00
committed by Bastian Köcher
parent 1e0c1d8850
commit 7f59cdb900
39 changed files with 298 additions and 290 deletions
@@ -51,11 +51,11 @@ where
/// build upon.
pub fn at_block(block_id: &BlockId<Block>, api: &'a A) -> error::Result<Self> {
let number = api.block_number_from_id(block_id)?
.ok_or_else(|| error::ErrorKind::UnknownBlock(format!("{}", block_id)))?
.ok_or_else(|| error::Error::UnknownBlock(format!("{}", block_id)))?
+ One::one();
let parent_hash = api.block_hash_from_id(block_id)?
.ok_or_else(|| error::ErrorKind::UnknownBlock(format!("{}", block_id)))?;
.ok_or_else(|| error::Error::UnknownBlock(format!("{}", block_id)))?;
let header = <<Block as BlockT>::Header as HeaderT>::new(
number,
Default::default(),
@@ -89,7 +89,7 @@ where
Ok(())
}
Err(e) => {
Err(error::ErrorKind::ApplyExtrinsicFailed(e).into())
Err(error::Error::ApplyExtrinsicFailed(e))
}
}
})