Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

removed client error #9253

Merged
merged 1 commit into from
Jul 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use ethereum_types::{H256, Address, U256};
use block::{IsBlock, LockedBlock, Drain, ClosedBlock, OpenBlock, enact_verified, SealedBlock};
use blockchain::{BlockChain, BlockChainDB, BlockProvider, TreeRoute, ImportRoute, TransactionAddress, ExtrasInsert};
use client::ancient_import::AncientVerifier;
use client::Error as ClientError;
use client::{
Nonce, Balance, ChainInfo, BlockInfo, CallContract, TransactionInfo,
RegistryInfo, ReopenBlock, PrepareOpenBlock, ScheduleInfo, ImportSealedBlock,
Expand Down Expand Up @@ -933,7 +932,7 @@ impl Client {
}

// prune ancient states until below the memory limit or only the minimum amount remain.
fn prune_ancient(&self, mut state_db: StateDB, chain: &BlockChain) -> Result<(), ClientError> {
fn prune_ancient(&self, mut state_db: StateDB, chain: &BlockChain) -> Result<(), ::error::Error> {
let number = match state_db.journal_db().latest_era() {
Some(n) => n,
None => return Ok(()),
Expand Down
55 changes: 0 additions & 55 deletions ethcore/src/client/error.rs

This file was deleted.

2 changes: 0 additions & 2 deletions ethcore/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
mod ancient_import;
mod client;
mod config;
mod error;
#[cfg(any(test, feature = "test-helpers"))]
mod evm_test_client;
mod io_message;
Expand All @@ -29,7 +28,6 @@ mod trace;

pub use self::client::*;
pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType};
pub use self::error::Error;
#[cfg(any(test, feature = "test-helpers"))]
pub use self::evm_test_client::{EvmTestClient, EvmTestError, TransactResult};
pub use self::io_message::ClientIoMessage;
Expand Down
16 changes: 0 additions & 16 deletions ethcore/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use unexpected::{Mismatch, OutOfBounds};
use ethtrie::TrieError;
use io::*;
use header::BlockNumber;
use client::Error as ClientError;
use snapshot::Error as SnapshotError;
use engines::EngineError;
use ethkey::Error as EthkeyError;
Expand Down Expand Up @@ -250,12 +249,6 @@ error_chain! {
}

errors {
#[doc = "Client configuration error."]
Client(err: ClientError) {
description("Client configuration error.")
display("Client configuration error {}", err)
}

#[doc = "Snapshot error."]
Snapshot(err: SnapshotError) {
description("Snapshot error.")
Expand Down Expand Up @@ -297,15 +290,6 @@ error_chain! {
/// Result of import block operation.
pub type ImportResult = EthcoreResult<H256>;

impl From<ClientError> for Error {
fn from(err: ClientError) -> Error {
match err {
ClientError::Trie(err) => ErrorKind::Trie(err).into(),
_ => ErrorKind::Client(err).into()
}
}
}

impl From<AccountsError> for Error {
fn from(err: AccountsError) -> Error {
ErrorKind::AccountProvider(err).into()
Expand Down