X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Finbound_payment.rs;h=731b68ce49f0d30365add7659e74792968872613;hb=89f162c168bc934f64a663f31ea12793568c55b1;hp=f4f114d957193c8bf696f8cc12cacb49c005d0ed;hpb=132b07239784749dcadfc2959a9487107789df56;p=rust-lightning diff --git a/lightning/src/ln/inbound_payment.rs b/lightning/src/ln/inbound_payment.rs index f4f114d9..731b68ce 100644 --- a/lightning/src/ln/inbound_payment.rs +++ b/lightning/src/ln/inbound_payment.rs @@ -14,14 +14,14 @@ use bitcoin::hashes::{Hash, HashEngine}; use bitcoin::hashes::cmp::fixed_time_eq; use bitcoin::hashes::hmac::{Hmac, HmacEngine}; use bitcoin::hashes::sha256::Hash as Sha256; -use chain::keysinterface::{KeyMaterial, KeysInterface, Sign}; -use ln::{PaymentHash, PaymentPreimage, PaymentSecret}; -use ln::msgs; -use ln::msgs::MAX_VALUE_MSAT; -use util::chacha20::ChaCha20; -use util::crypto::hkdf_extract_expand_thrice; -use util::errors::APIError; -use util::logger::Logger; +use crate::chain::keysinterface::{KeyMaterial, KeysInterface}; +use crate::ln::{PaymentHash, PaymentPreimage, PaymentSecret}; +use crate::ln::msgs; +use crate::ln::msgs::MAX_VALUE_MSAT; +use crate::util::chacha20::ChaCha20; +use crate::util::crypto::hkdf_extract_expand_thrice; +use crate::util::errors::APIError; +use crate::util::logger::Logger; use core::convert::TryInto; use core::ops::Deref; @@ -91,8 +91,8 @@ impl Method { /// `current_time` is a Unix timestamp representing the current time. /// /// [phantom node payments]: crate::chain::keysinterface::PhantomKeysManager -pub fn create(keys: &ExpandedKey, min_value_msat: Option, invoice_expiry_delta_secs: u32, keys_manager: &K, current_time: u64) -> Result<(PaymentHash, PaymentSecret), ()> - where K::Target: KeysInterface +pub fn create(keys: &ExpandedKey, min_value_msat: Option, invoice_expiry_delta_secs: u32, keys_manager: &K, current_time: u64) -> Result<(PaymentHash, PaymentSecret), ()> + where K::Target: KeysInterface { let metadata_bytes = construct_metadata_bytes(min_value_msat, Method::LdkPaymentHash, invoice_expiry_delta_secs, current_time)?;