Expunge error-chain (feat. tomaka) (#2662)

* Remove error_chain

* Expunge error-chain from rpc and service.

* Expunge from transaction pool.

* Expunge from node/cli

* Expunge from keystore.

* Remove some boilerplate.

* Fix remaining stuff.

* Improve on deprecation message.

* Fix issues.

* Fix trnsaction pool tests.

* Fix the rest.

* Fix borked merge.

* Update lock
This commit is contained in:
Tomasz Drwięga
2019-05-24 11:35:31 +02:00
committed by Gavin Wood
parent 69ffec5822
commit c162fc5ff1
68 changed files with 951 additions and 1158 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ use runtime_primitives::traits::{Header, SaturatedConversion};
use substrate_executor::NativeExecutor;
use tel::{telemetry, SUBSTRATE_INFO};
pub use self::error::{ErrorKind, Error};
pub use self::error::Error;
pub use config::{Configuration, Roles, PruningMode};
pub use chain_spec::{ChainSpec, Properties};
pub use transaction_pool::txpool::{
@@ -515,7 +515,7 @@ impl<C: Components> network::TransactionPool<ComponentExHash<C>, ComponentBlock<
match self.pool.submit_one(&best_block_id, uxt) {
Ok(hash) => Some(hash),
Err(e) => match e.into_pool_error() {
Ok(txpool::error::Error(txpool::error::ErrorKind::AlreadyImported(hash), _)) => {
Ok(txpool::error::Error::AlreadyImported(hash)) => {
hash.downcast::<ComponentExHash<C>>().ok()
.map(|x| x.as_ref().clone())
},