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
This commit is contained in:
parent
4ee217ba7c
commit
e1333ea1e9
@ -917,7 +917,10 @@ impl Configuration {
|
|||||||
let provider_conf = ProviderConfig {
|
let provider_conf = ProviderConfig {
|
||||||
validator_accounts: to_addresses(&self.args.arg_private_validators)?,
|
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()),
|
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 {
|
let encryptor_conf = EncryptorConfig {
|
||||||
@ -1455,11 +1458,7 @@ mod tests {
|
|||||||
net_settings: Default::default(),
|
net_settings: Default::default(),
|
||||||
ipfs_conf: Default::default(),
|
ipfs_conf: Default::default(),
|
||||||
secretstore_conf: Default::default(),
|
secretstore_conf: Default::default(),
|
||||||
private_provider_conf: ProviderConfig {
|
private_provider_conf: Default::default(),
|
||||||
validator_accounts: Default::default(),
|
|
||||||
signer_account: Default::default(),
|
|
||||||
logs_path: Some(Directories::default().base),
|
|
||||||
},
|
|
||||||
private_encryptor_conf: Default::default(),
|
private_encryptor_conf: Default::default(),
|
||||||
private_tx_enabled: false,
|
private_tx_enabled: false,
|
||||||
name: "".into(),
|
name: "".into(),
|
||||||
|
Loading…
Reference in New Issue
Block a user