Skip to content

Commit 861497e

Browse files
committed
Remove unused callback arg from construct_keys_for_onion_message
1 parent 5a6d96d commit 861497e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lightning/src/blinded_path/utils.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,12 @@ pub(crate) fn construct_keys_for_onion_message<'a, T, I, F>(
113113
where
114114
T: secp256k1::Signing + secp256k1::Verification,
115115
I: Iterator<Item = PublicKey>,
116-
F: FnMut(PublicKey, SharedSecret, PublicKey, [u8; 32], Option<PublicKey>, Option<Vec<u8>>),
116+
F: FnMut(SharedSecret, PublicKey, [u8; 32], Option<PublicKey>, Option<Vec<u8>>),
117117
{
118-
build_keys_helper!(session_priv, secp_ctx, callback);
118+
let mut callback_wrapper = |_, ss, pk, encrypted_payload_rho, unblinded_hop_data, encrypted_payload| {
119+
callback(ss, pk, encrypted_payload_rho, unblinded_hop_data, encrypted_payload);
120+
};
121+
build_keys_helper!(session_priv, secp_ctx, callback_wrapper);
119122

120123
for pk in unblinded_path {
121124
build_keys_in_loop!(pk, false, None);

lightning/src/onion_message/messenger.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,8 +2243,7 @@ fn packet_payloads_and_keys<
22432243
unblinded_path.into_iter(),
22442244
destination,
22452245
session_priv,
2246-
|_,
2247-
onion_packet_ss,
2246+
|onion_packet_ss,
22482247
ephemeral_pubkey,
22492248
control_tlvs_ss,
22502249
unblinded_pk_opt,

0 commit comments

Comments
 (0)