Private tx enabled flag added into STATUS packet (#9999)
* Add private tx enabled flag into status packet * Error log added for the case with no peers available * Add flag only for supported protocol versions * Work with private handler refactored * Log target changed * Cargo.lock updated
This commit is contained in:
committed by
Afri Schoedon
parent
90fb473d87
commit
b180be7526
@@ -37,7 +37,7 @@ pub fn sync(
|
||||
network_config: NetworkConfiguration,
|
||||
chain: Arc<BlockChainClient>,
|
||||
snapshot_service: Arc<SnapshotService>,
|
||||
private_tx_handler: Arc<PrivateTxHandler>,
|
||||
private_tx_handler: Option<Arc<PrivateTxHandler>>,
|
||||
provider: Arc<Provider>,
|
||||
_log_settings: &LogConfig,
|
||||
attached_protos: Vec<AttachedProtocol>,
|
||||
|
||||
@@ -31,7 +31,7 @@ use ethcore::verification::queue::VerifierSettings;
|
||||
use ethcore_logger::{Config as LogConfig, RotatingLogger};
|
||||
use ethcore_service::ClientService;
|
||||
use ethereum_types::Address;
|
||||
use sync::{self, SyncConfig};
|
||||
use sync::{self, SyncConfig, PrivateTxHandler};
|
||||
use miner::work_notify::WorkPoster;
|
||||
use futures::IntoFuture;
|
||||
use hash_fetch::{self, fetch};
|
||||
@@ -666,13 +666,18 @@ fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq:
|
||||
None
|
||||
};
|
||||
|
||||
let private_tx_sync: Option<Arc<PrivateTxHandler>> = match cmd.private_tx_enabled {
|
||||
true => Some(private_tx_service.clone() as Arc<PrivateTxHandler>),
|
||||
false => None,
|
||||
};
|
||||
|
||||
// create sync object
|
||||
let (sync_provider, manage_network, chain_notify, priority_tasks) = modules::sync(
|
||||
sync_config,
|
||||
net_conf.clone().into(),
|
||||
client.clone(),
|
||||
snapshot_service.clone(),
|
||||
private_tx_service.clone(),
|
||||
private_tx_sync,
|
||||
client.clone(),
|
||||
&cmd.logger_config,
|
||||
attached_protos,
|
||||
|
||||
Reference in New Issue
Block a user