ValidatorSet reporting (#4208)
* remove register_account_provider * build rpc module * new dummy client * common EngineSigner struct * from -> into * initial report via call * separate safe from regular contract * transact_contract * fix build * return Signature, docs * add sign method to some engines * add safeContract spec * update specs to new contracts * use AuthorityRound for contract spec * add more reporting * add reporting test * use gas floor * shorter
This commit is contained in:
@@ -26,6 +26,7 @@ use types::block_import_error::BlockImportError;
|
||||
use snapshot::Error as SnapshotError;
|
||||
use engines::EngineError;
|
||||
use ethkey::Error as EthkeyError;
|
||||
use account_provider::Error as AccountsError;
|
||||
|
||||
pub use types::executed::{ExecutionError, CallError};
|
||||
|
||||
@@ -265,6 +266,8 @@ pub enum Error {
|
||||
Engine(EngineError),
|
||||
/// Ethkey error.
|
||||
Ethkey(EthkeyError),
|
||||
/// Account Provider error.
|
||||
AccountProvider(AccountsError),
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
@@ -287,6 +290,7 @@ impl fmt::Display for Error {
|
||||
Error::Snapshot(ref err) => err.fmt(f),
|
||||
Error::Engine(ref err) => err.fmt(f),
|
||||
Error::Ethkey(ref err) => err.fmt(f),
|
||||
Error::AccountProvider(ref err) => err.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -396,6 +400,12 @@ impl From<EthkeyError> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<AccountsError> for Error {
|
||||
fn from(err: AccountsError) -> Error {
|
||||
Error::AccountProvider(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl<E> From<Box<E>> for Error where Error: From<E> {
|
||||
fn from(err: Box<E>) -> Error {
|
||||
Error::from(*err)
|
||||
|
||||
Reference in New Issue
Block a user