Skip to content

Commit

Permalink
switch from i64 to u64
Browse files Browse the repository at this point in the history
  • Loading branch information
Cifko committed Dec 8, 2022
1 parent fa9b13b commit e17e476
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base_layer/wallet/src/output_manager_service/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub struct OutputManagerServiceConfig {
/// inputs for further transactions, but can still be selected individually as specific outputs.
pub autoignore_onesided_utxos: bool,
/// The number of seconds that have to pass for the wallet to run revalidation of invalid UTXOs on startup.
pub num_of_seconds_to_revalidate_invalid_utxos: i64,
pub num_of_seconds_to_revalidate_invalid_utxos: u64,
}

impl Default for OutputManagerServiceConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,16 @@ where
let invalid_outputs = self
.db
.fetch_invalid_outputs(
(Utc::now() - Duration::seconds(self.config.num_of_seconds_to_revalidate_invalid_utxos)).timestamp(),
(Utc::now() -
Duration::seconds(
self.config
.num_of_seconds_to_revalidate_invalid_utxos
.try_into()
.map_err(|_| {
OutputManagerProtocolError::new(self.operation_id, OutputManagerError::InvalidConfig)
})?,
))
.timestamp(),
)
.for_protocol(self.operation_id)?;

Expand Down

0 comments on commit e17e476

Please sign in to comment.