[ethcore] remove error_chain (#10616)
* Derive Display for BlockError * Convert error_chain errors * Convert ethcore usages of errors * Fix remaining compile errors in ethcore * Fix other crates * Fix tests compilation * Implement error for Snapshot error * Remove redundant into
This commit is contained in:
committed by
Andronik Ordian
parent
b30b54e446
commit
98b89c8e4f
@@ -28,7 +28,7 @@ use rlp::PayloadInfo;
|
||||
use ethcore::client::{
|
||||
Mode, DatabaseCompactionProfile, VMType, Nonce, Balance, BlockChainClient, BlockId, BlockInfo, ImportBlock, BlockChainReset
|
||||
};
|
||||
use ethcore::error::{ImportErrorKind, ErrorKind as EthcoreErrorKind, Error as EthcoreError};
|
||||
use ethcore::error::{ImportError, Error as EthcoreError};
|
||||
use ethcore::miner::Miner;
|
||||
use ethcore::verification::queue::VerifierSettings;
|
||||
use ethcore::verification::queue::kind::blocks::Unverified;
|
||||
@@ -272,7 +272,7 @@ fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> {
|
||||
}
|
||||
|
||||
match client.import_header(header) {
|
||||
Err(EthcoreError(EthcoreErrorKind::Import(ImportErrorKind::AlreadyInChain), _)) => {
|
||||
Err(EthcoreError::Import(ImportError::AlreadyInChain)) => {
|
||||
trace!("Skipping block already in chain.");
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -444,7 +444,7 @@ fn execute_import(cmd: ImportBlockchain) -> Result<(), String> {
|
||||
let block = Unverified::from_rlp(bytes).map_err(|_| "Invalid block rlp")?;
|
||||
while client.queue_info().is_full() { sleep(Duration::from_secs(1)); }
|
||||
match client.import_block(block) {
|
||||
Err(EthcoreError(EthcoreErrorKind::Import(ImportErrorKind::AlreadyInChain), _)) => {
|
||||
Err(EthcoreError::Import(ImportError::AlreadyInChain)) => {
|
||||
trace!("Skipping block already in chain.");
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user