From 98157c9347d1d0c79d5d043c03f461300eca0c78 Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Sun, 28 Apr 2024 13:54:08 -0400 Subject: [PATCH] free: use `u64_to_timelock()` --- Cargo.lock | 1 + database/src/free.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 56d495e8..c93e7465 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -638,6 +638,7 @@ dependencies = [ "dirs", "futures", "libc", + "monero-serai", "rayon", "tokio", "windows", diff --git a/database/src/free.rs b/database/src/free.rs index ca44052c..8982984f 100644 --- a/database/src/free.rs +++ b/database/src/free.rs @@ -2,6 +2,7 @@ //---------------------------------------------------------------------------------------------------- Import +use cuprate_helper::map::u64_to_timelock; use cuprate_types::OutputOnChain; use curve25519_dalek::{constants::ED25519_BASEPOINT_POINT, edwards::CompressedEdwardsY, Scalar}; use monero_serai::{transaction::Timelock, H}; @@ -27,7 +28,7 @@ pub(crate) fn output_to_output_on_chain( .output_flags .contains(OutputFlags::NON_ZERO_UNLOCK_TIME) { - Timelock::Time(table_tx_unlock_time.get(&output.tx_idx)?) + u64_to_timelock(table_tx_unlock_time.get(&output.tx_idx)?) } else { Timelock::None };