]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Rename construct_keys_callback functions
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 16 Aug 2024 15:19:07 +0000 (10:19 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 20 Aug 2024 21:54:10 +0000 (16:54 -0500)
lightning/src/blinded_path/utils.rs
lightning/src/onion_message/messenger.rs

index 8de36c1c88df4856064a94e1d6a6fcc74c09be71..7472f8f393f72cf26a30fe3206a6d86d9f7e726e 100644 (file)
@@ -88,7 +88,7 @@ macro_rules! build_keys_helper {
 }}
 
 #[inline]
-pub(crate) fn construct_keys_callback<'a, T, I, F>(
+pub(crate) fn construct_keys_for_onion_message<'a, T, I, F>(
        secp_ctx: &Secp256k1<T>, unblinded_path: I, destination: Destination, session_priv: &SecretKey,
        mut callback: F,
 ) -> Result<(), secp256k1::Error>
@@ -116,7 +116,7 @@ where
 }
 
 #[inline]
-pub(super) fn construct_keys_callback_for_blinded_path<'a, T, I, F, H>(
+pub(super) fn construct_keys_for_blinded_path<'a, T, I, F, H>(
        secp_ctx: &Secp256k1<T>, unblinded_path: I, session_priv: &SecretKey, mut callback: F,
 ) -> Result<(), secp256k1::Error>
 where
@@ -153,7 +153,7 @@ where
        W: Writeable
 {
        let mut blinded_hops = Vec::with_capacity(unblinded_path.size_hint().0);
-       construct_keys_callback_for_blinded_path(
+       construct_keys_for_blinded_path(
                secp_ctx, unblinded_path.map(|(pubkey, tlvs)| PublicKeyWithTlvs { pubkey, tlvs }), session_priv,
                |blinded_node_id, _, _, encrypted_payload_rho, unblinded_hop_data, _| {
                        blinded_hops.push(BlindedHop {
index 11a2d9f946ba8defd0679f1aa4e0dbb3d17f926a..58c7bf5e0d937ff61afe9acfe64ec9a354a47d78 100644 (file)
@@ -1809,7 +1809,7 @@ fn packet_payloads_and_keys<T: OnionMessageContents, S: secp256k1::Signing + sec
        let mut blinded_path_idx = 0;
        let mut prev_control_tlvs_ss = None;
        let mut final_control_tlvs = None;
-       utils::construct_keys_callback(
+       utils::construct_keys_for_onion_message(
                secp_ctx, unblinded_path.into_iter(), destination, session_priv,
                |_, onion_packet_ss, ephemeral_pubkey, control_tlvs_ss, unblinded_pk_opt, enc_payload_opt| {
                        if num_unblinded_hops != 0 && unblinded_path_idx < num_unblinded_hops {