Snapshot sync and block gap info in eth_syncing (#2948)
* provide snapshot sync info in eth_syncing * specify block gap in eth_syncing * Extend eth_syncing with warp, format the output properly * adjust serialization tests for sync info * whitespace
This commit is contained in:
committed by
Gav Wood
parent
ff90fac125
commit
8599a11a0b
@@ -23,6 +23,7 @@ use util::RotatingLogger;
|
||||
use ethcore::miner::{Miner, ExternalMiner};
|
||||
use ethcore::client::Client;
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::snapshot::SnapshotService;
|
||||
use ethsync::{ManageNetwork, SyncProvider};
|
||||
use ethcore_rpc::{Extendable, NetworkSettings};
|
||||
pub use ethcore_rpc::SignerService;
|
||||
@@ -97,6 +98,7 @@ impl FromStr for ApiSet {
|
||||
pub struct Dependencies {
|
||||
pub signer_service: Arc<SignerService>,
|
||||
pub client: Arc<Client>,
|
||||
pub snapshot: Arc<SnapshotService>,
|
||||
pub sync: Arc<SyncProvider>,
|
||||
pub net: Arc<ManageNetwork>,
|
||||
pub secret_store: Arc<AccountProvider>,
|
||||
@@ -161,6 +163,7 @@ pub fn setup_rpc<T: Extendable>(server: T, deps: Arc<Dependencies>, apis: ApiSet
|
||||
Api::Eth => {
|
||||
let client = EthClient::new(
|
||||
&deps.client,
|
||||
&deps.snapshot,
|
||||
&deps.sync,
|
||||
&deps.secret_store,
|
||||
&deps.miner,
|
||||
|
||||
@@ -251,6 +251,7 @@ pub fn execute(cmd: RunCmd) -> Result<(), String> {
|
||||
signer_service: Arc::new(rpc_apis::SignerService::new(move || {
|
||||
signer::generate_new_token(signer_path.clone()).map_err(|e| format!("{:?}", e))
|
||||
}, cmd.signer_port)),
|
||||
snapshot: snapshot_service.clone(),
|
||||
client: client.clone(),
|
||||
sync: sync_provider.clone(),
|
||||
net: manage_network.clone(),
|
||||
|
||||
Reference in New Issue
Block a user