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:
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::sync::Weak;
|
||||
use util::*;
|
||||
use ethkey::{recover, public_to_address};
|
||||
use ethkey::{recover, public_to_address, Signature};
|
||||
use account_provider::AccountProvider;
|
||||
use block::*;
|
||||
use builtin::Builtin;
|
||||
@@ -165,12 +165,16 @@ impl Engine for BasicAuthority {
|
||||
}
|
||||
|
||||
fn register_client(&self, client: Weak<Client>) {
|
||||
self.validators.register_call_contract(client);
|
||||
self.validators.register_contract(client);
|
||||
}
|
||||
|
||||
fn set_signer(&self, ap: Arc<AccountProvider>, address: Address, password: String) {
|
||||
self.signer.set(ap, address, password);
|
||||
}
|
||||
|
||||
fn sign(&self, hash: H256) -> Result<Signature, Error> {
|
||||
self.signer.sign(hash).map_err(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user