X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fblinded_path%2Futils.rs;h=1ac6519452c1eb10af3757240d41a046d381efaa;hb=9777485ed70689d55caf988b13ff7b7a0204429f;hp=a188274a5d2fccd0b2eeee67c77c16530c53e1aa;hpb=1b356619b3b178ef5a4f392056ed2fd5b7de2541;p=rust-lightning diff --git a/lightning/src/blinded_path/utils.rs b/lightning/src/blinded_path/utils.rs index a188274a..1ac65194 100644 --- a/lightning/src/blinded_path/utils.rs +++ b/lightning/src/blinded_path/utils.rs @@ -27,11 +27,15 @@ use crate::prelude::*; // TODO: DRY with onion_utils::construct_onion_keys_callback #[inline] -pub(crate) fn construct_keys_callback, Option>)>( - secp_ctx: &Secp256k1, unblinded_path: &[PublicKey], destination: Option, - session_priv: &SecretKey, mut callback: FType -) -> Result<(), secp256k1::Error> { +pub(crate) fn construct_keys_callback<'a, T, I, F>( + secp_ctx: &Secp256k1, unblinded_path: I, destination: Option, + session_priv: &SecretKey, mut callback: F +) -> Result<(), secp256k1::Error> +where + T: secp256k1::Signing + secp256k1::Verification, + I: Iterator, + F: FnMut(PublicKey, SharedSecret, PublicKey, [u8; 32], Option, Option>), +{ let mut msg_blinding_point_priv = session_priv.clone(); let mut msg_blinding_point = PublicKey::from_secret_key(secp_ctx, &msg_blinding_point_priv); let mut onion_packet_pubkey_priv = msg_blinding_point_priv.clone();