X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Finbound_payment.rs;h=0c80ae7bb4ad32b55af832eb3f1e2911ec457fb6;hb=7e23afe1dc1971b151cf3471a90a4987580d53d0;hp=6e36cc1c0221dfbda1c424173d986cfa5b0f51db;hpb=5824e226cad67e32d5e8be71ebbb6f91a3fc2116;p=rust-lightning diff --git a/lightning/src/ln/inbound_payment.rs b/lightning/src/ln/inbound_payment.rs index 6e36cc1c..0c80ae7b 100644 --- a/lightning/src/ln/inbound_payment.rs +++ b/lightning/src/ln/inbound_payment.rs @@ -92,13 +92,13 @@ impl Method { /// /// [phantom node payments]: crate::chain::keysinterface::PhantomKeysManager /// [`NodeSigner::get_inbound_payment_key_material`]: crate::chain::keysinterface::NodeSigner::get_inbound_payment_key_material -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: EntropySource +pub fn create(keys: &ExpandedKey, min_value_msat: Option, invoice_expiry_delta_secs: u32, entropy_source: &ES, current_time: u64) -> Result<(PaymentHash, PaymentSecret), ()> + where ES::Target: EntropySource { let metadata_bytes = construct_metadata_bytes(min_value_msat, Method::LdkPaymentHash, invoice_expiry_delta_secs, current_time)?; let mut iv_bytes = [0 as u8; IV_LEN]; - let rand_bytes = keys_manager.get_secure_random_bytes(); + let rand_bytes = entropy_source.get_secure_random_bytes(); iv_bytes.copy_from_slice(&rand_bytes[..IV_LEN]); let mut hmac = HmacEngine::::new(&keys.ldk_pmt_hash_key);