From e1333ea1e99f1ce6780bedb2280e7d9fb1b71be1 Mon Sep 17 00:00:00 2001 From: Anton Gavrilov Date: Wed, 19 Jun 2019 16:28:31 +0200 Subject: [PATCH] Initialize private tx logger only if private tx functionality is enabled (#10758) * Initialize private tx logger only if private tx functionality is enabled * Fix configuration test * Use default contructor for config --- parity/configuration.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/parity/configuration.rs b/parity/configuration.rs index 0d6c2d86f..2a807e99b 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -917,7 +917,10 @@ impl Configuration { let provider_conf = ProviderConfig { validator_accounts: to_addresses(&self.args.arg_private_validators)?, signer_account: self.args.arg_private_signer.clone().and_then(|account| to_address(Some(account)).ok()), - logs_path: Some(dirs.base), + logs_path: match self.args.flag_private_enabled { + true => Some(dirs.base), + false => None, + } }; let encryptor_conf = EncryptorConfig { @@ -1455,11 +1458,7 @@ mod tests { net_settings: Default::default(), ipfs_conf: Default::default(), secretstore_conf: Default::default(), - private_provider_conf: ProviderConfig { - validator_accounts: Default::default(), - signer_account: Default::default(), - logs_path: Some(Directories::default().base), - }, + private_provider_conf: Default::default(), private_encryptor_conf: Default::default(), private_tx_enabled: false, name: "".into(),