Trivial journal for private transactions (#10056)
* Journal for private txs added * Tests after adding logging to private tx fixed * Logs getter and tests added * Time and amount limit for logs added * RPC method for log retrieving added * Correct path name and time validation implemented * References for parameters added, redundant cloning reworked * References for parameters added, redundant cloning reworked * Work with json moved to the separate struct * Serialization test added * Fixed build after the merge with head * Documentation for methods fixed, redundant field removed * Fixed error usages * Timestamp trait implemented for std struct * Commented code removed * Remove timestamp source, rework serialization test * u64 replaced with SystemTime * Path made mandatory for logging * Source of monotonic time added * into_system_time method renamed * Initialize time source by max from current system time and max creation time from already saved logs * Redundant conversions removed, code a little bit reworked according to review comments * One more redundant conversion removed, rpc call simplified
This commit is contained in:
committed by
Niklas Adolfsson
parent
87699f8de0
commit
5a581c1c90
@@ -914,9 +914,11 @@ impl Configuration {
|
||||
}
|
||||
|
||||
fn private_provider_config(&self) -> Result<(ProviderConfig, EncryptorConfig, bool), String> {
|
||||
let dirs = self.directories();
|
||||
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),
|
||||
};
|
||||
|
||||
let encryptor_conf = EncryptorConfig {
|
||||
@@ -1458,7 +1460,11 @@ mod tests {
|
||||
net_settings: Default::default(),
|
||||
ipfs_conf: Default::default(),
|
||||
secretstore_conf: Default::default(),
|
||||
private_provider_conf: Default::default(),
|
||||
private_provider_conf: ProviderConfig {
|
||||
validator_accounts: Default::default(),
|
||||
signer_account: Default::default(),
|
||||
logs_path: Some(Directories::default().base),
|
||||
},
|
||||
private_encryptor_conf: Default::default(),
|
||||
private_tx_enabled: false,
|
||||
name: "".into(),
|
||||
|
||||
Reference in New Issue
Block a user