removed unused trait PrivateNotify and unused Error types (#10847)
This commit is contained in:
parent
b97bf81adf
commit
86ef490a94
@ -51,10 +51,8 @@ pub use types::call_analytics::CallAnalytics;
|
|||||||
pub use executive::{Executed, Executive, TransactOptions};
|
pub use executive::{Executed, Executive, TransactOptions};
|
||||||
pub use vm::{LastHashes, EnvInfo};
|
pub use vm::{LastHashes, EnvInfo};
|
||||||
|
|
||||||
pub use error::TransactionImportError;
|
|
||||||
pub use verification::VerifierType;
|
pub use verification::VerifierType;
|
||||||
|
|
||||||
mod traits;
|
mod traits;
|
||||||
|
|
||||||
mod chain_notify;
|
mod chain_notify;
|
||||||
mod private_notify;
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
|
||||||
// This file is part of Parity Ethereum.
|
|
||||||
|
|
||||||
// Parity Ethereum is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
|
|
||||||
// Parity Ethereum is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
use error::TransactionImportError;
|
|
||||||
|
|
||||||
/// Represent private transactions handler inside the client
|
|
||||||
pub trait PrivateNotify : Send + Sync {
|
|
||||||
/// fires when private transaction message queued via client io queue
|
|
||||||
fn private_transaction_queued(&self) -> Result<(), TransactionImportError>;
|
|
||||||
}
|
|
@ -186,24 +186,6 @@ pub enum ImportError {
|
|||||||
|
|
||||||
impl error::Error for ImportError {}
|
impl error::Error for ImportError {}
|
||||||
|
|
||||||
/// Api-level error for transaction import
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub enum TransactionImportError {
|
|
||||||
/// Transaction error
|
|
||||||
Transaction(TransactionError),
|
|
||||||
/// Other error
|
|
||||||
Other(String),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<Error> for TransactionImportError {
|
|
||||||
fn from(e: Error) -> Self {
|
|
||||||
match e {
|
|
||||||
Error::Transaction(transaction_error) => TransactionImportError::Transaction(transaction_error),
|
|
||||||
_ => TransactionImportError::Other(format!("other block import error: {:?}", e)),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Ethcore Result
|
/// Ethcore Result
|
||||||
pub type EthcoreResult<T> = Result<T, Error>;
|
pub type EthcoreResult<T> = Result<T, Error>;
|
||||||
|
|
||||||
@ -255,9 +237,6 @@ pub enum Error {
|
|||||||
/// The value of the nonce or mishash is invalid.
|
/// The value of the nonce or mishash is invalid.
|
||||||
#[display(fmt = "The value of the nonce or mishash is invalid.")]
|
#[display(fmt = "The value of the nonce or mishash is invalid.")]
|
||||||
PowInvalid,
|
PowInvalid,
|
||||||
/// Unknown engine given
|
|
||||||
#[display(fmt = "Unknown engine name ({})", _0)]
|
|
||||||
UnknownEngineName(String),
|
|
||||||
/// A convenient variant for String.
|
/// A convenient variant for String.
|
||||||
#[display(fmt = "{}", _0)]
|
#[display(fmt = "{}", _0)]
|
||||||
Msg(String),
|
Msg(String),
|
||||||
@ -282,12 +261,6 @@ impl error::Error for Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<String> for Error {
|
|
||||||
fn from(s: String) -> Self {
|
|
||||||
Error::Msg(s)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<&str> for Error {
|
impl From<&str> for Error {
|
||||||
fn from(s: &str) -> Self {
|
fn from(s: &str) -> Self {
|
||||||
Error::Msg(s.into())
|
Error::Msg(s.into())
|
||||||
|
Loading…
Reference in New Issue
Block a user