free: use u64_to_timelock()

This commit is contained in:
hinto.janai 2024-04-28 13:54:08 -04:00
parent 8015267db3
commit 98157c9347
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 3 additions and 1 deletions

1
Cargo.lock generated
View file

@ -638,6 +638,7 @@ dependencies = [
"dirs",
"futures",
"libc",
"monero-serai",
"rayon",
"tokio",
"windows",

View file

@ -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
};