Deprecate account management (#10213)

* Extract accounts from ethcore.

* Fix ethcore.

* Get rid of AccountProvider in test_helpers

* Fix rest of the code.

* Re-use EngineSigner, fix tests.

* Simplify EngineSigner to always have an Address.

* Fix RPC tests.

* Add deprecation notice to RPCs.

* Feature to disable accounts.

* extract accounts in RPC

* Run with accounts in tests.

* Fix RPC compilation and tests.

* Fix compilation of the binary.

* Fix compilation of the binary.

* Fix compilation with accounts enabled.

* Fix tests.

* Update submodule.

* Remove android.

* Use derive for Default

* Don't build secretstore by default.

* Add link to issue.

* Refresh Cargo.lock.

* Fix miner tests.

* Update rpc/Cargo.toml

Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com>

* Fix private tests.
This commit is contained in:
Tomasz Drwięga
2019-02-07 14:34:24 +01:00
committed by Afri Schoedon
parent 8fa56add47
commit d5c19f8719
102 changed files with 3222 additions and 2393 deletions

View File

@@ -25,7 +25,6 @@ use ethcore::client::{TestBlockChainClient, BlockChainClient, Client as EthcoreC
ClientConfig, ChainNotify, NewBlocks, ChainMessageType, ClientIoMessage};
use ethcore::snapshot::SnapshotService;
use ethcore::spec::Spec;
use ethcore::account_provider::AccountProvider;
use ethcore::miner::Miner;
use ethcore::test_helpers;
use sync_io::SyncIo;
@@ -367,11 +366,10 @@ impl TestNet<EthPeer<TestBlockChainClient>> {
}
impl TestNet<EthPeer<EthcoreClient>> {
pub fn with_spec_and_accounts<F>(
pub fn with_spec<F>(
n: usize,
config: SyncConfig,
spec_factory: F,
accounts: Option<Arc<AccountProvider>>
) -> Self
where F: Fn() -> Spec
{
@@ -381,14 +379,14 @@ impl TestNet<EthPeer<EthcoreClient>> {
disconnect_events: Vec::new(),
};
for _ in 0..n {
net.add_peer_with_private_config(config.clone(), spec_factory(), accounts.clone());
net.add_peer_with_private_config(config.clone(), spec_factory());
}
net
}
pub fn add_peer_with_private_config(&mut self, config: SyncConfig, spec: Spec, accounts: Option<Arc<AccountProvider>>) {
pub fn add_peer_with_private_config(&mut self, config: SyncConfig, spec: Spec) {
let channel = IoChannel::disconnected();
let miner = Arc::new(Miner::new_for_tests(&spec, accounts.clone()));
let miner = Arc::new(Miner::new_for_tests(&spec, None));
let client = EthcoreClient::new(
ClientConfig::default(),
&spec,