diff --git a/lightning/src/ln/onion_utils.rs b/lightning/src/ln/onion_utils.rs index 781505670ab..39d9793212f 100644 --- a/lightning/src/ln/onion_utils.rs +++ b/lightning/src/ln/onion_utils.rs @@ -1412,6 +1412,7 @@ use crate::prelude::*; } use crate::ln::channelmanager::RecipientOnionFields; + use crate::sign::KeysManager; use super::{create_payment_onion, peel_payment_onion}; use super::{PeeledPayment, ReceivedPayment}; @@ -1419,7 +1420,7 @@ use crate::prelude::*; SecretKey, u64, u32, RecipientOnionFields, PaymentPreimage, PaymentHash, [u8; 32], Vec, u64, PaymentSecret, ) { - use std::convert::TryInto; + use core::convert::TryInto; use super::{Sha256, Hash}; let session_priv_bytes = [42; 32]; @@ -1518,12 +1519,8 @@ use crate::prelude::*; } - fn make_keys_manager(seed: &[u8; 32]) -> crate::sign::KeysManager { - use crate::sign::KeysManager; - use std::time::{SystemTime, UNIX_EPOCH}; - let start = SystemTime::now(); - let now = start.duration_since(UNIX_EPOCH).expect("Time went backwards"); - KeysManager::new(seed, now.as_secs(), now.subsec_nanos()) + fn make_keys_manager(seed: &[u8; 32]) -> KeysManager { + KeysManager::new(seed, 42, 42) } }