@@ -198,8 +198,6 @@ pub enum PendingHTLCRouting {
198
198
custom_tlvs: Vec<(u64, Vec<u8>)>,
199
199
/// Set if this HTLC is the final hop in a multi-hop blinded path.
200
200
requires_blinded_error: bool,
201
- /// An HMAC of `payment_context` along with a nonce used to construct it.
202
- authentication: Option<(Hmac<Sha256>, Nonce)>,
203
201
},
204
202
/// The onion indicates that this is for payment to us but which contains the preimage for
205
203
/// claiming included, and is unrelated to any invoice we'd previously generated (aka a
@@ -5996,19 +5994,19 @@ where
5996
5994
let blinded_failure = routing.blinded_failure();
5997
5995
let (
5998
5996
cltv_expiry, onion_payload, payment_data, payment_context, phantom_shared_secret,
5999
- mut onion_fields, has_recipient_created_payment_secret, authentication,
5997
+ mut onion_fields, has_recipient_created_payment_secret
6000
5998
) = match routing {
6001
5999
PendingHTLCRouting::Receive {
6002
6000
payment_data, payment_metadata, payment_context,
6003
6001
incoming_cltv_expiry, phantom_shared_secret, custom_tlvs,
6004
- requires_blinded_error: _, authentication,
6002
+ requires_blinded_error: _
6005
6003
} => {
6006
6004
let _legacy_hop_data = Some(payment_data.clone());
6007
6005
let onion_fields = RecipientOnionFields { payment_secret: Some(payment_data.payment_secret),
6008
6006
payment_metadata, custom_tlvs };
6009
6007
(incoming_cltv_expiry, OnionPayload::Invoice { _legacy_hop_data },
6010
6008
Some(payment_data), payment_context, phantom_shared_secret, onion_fields,
6011
- true, authentication )
6009
+ true)
6012
6010
},
6013
6011
PendingHTLCRouting::ReceiveKeysend {
6014
6012
payment_data, payment_preimage, payment_metadata,
@@ -6021,7 +6019,7 @@ where
6021
6019
custom_tlvs,
6022
6020
};
6023
6021
(incoming_cltv_expiry, OnionPayload::Spontaneous(payment_preimage),
6024
- payment_data, None, None, onion_fields, has_recipient_created_payment_secret, None )
6022
+ payment_data, None, None, onion_fields, has_recipient_created_payment_secret)
6025
6023
},
6026
6024
_ => {
6027
6025
panic!("short_channel_id == 0 should imply any pending_forward entries are of type Receive");
@@ -6206,16 +6204,6 @@ where
6206
6204
payment_preimage
6207
6205
} else { fail_htlc!(claimable_htlc, payment_hash); }
6208
6206
} else { None };
6209
-
6210
- // Authenticate the PaymentContext received over a BlindedPaymentPath
6211
- if let Some(payment_context) = payment_context.as_ref() {
6212
- if let Some((hmac, nonce)) = authentication {
6213
- if payment_context.verify_for_offer_payment(hmac, nonce, &self.inbound_payment_key).is_err() {
6214
- fail_htlc!(claimable_htlc, payment_hash);
6215
- }
6216
- }
6217
- }
6218
-
6219
6207
match claimable_htlc.onion_payload {
6220
6208
OnionPayload::Invoice { .. } => {
6221
6209
let payment_data = payment_data.unwrap();
@@ -12374,7 +12362,6 @@ impl_writeable_tlv_based_enum!(PendingHTLCRouting,
12374
12362
(5, custom_tlvs, optional_vec),
12375
12363
(7, requires_blinded_error, (default_value, false)),
12376
12364
(9, payment_context, option),
12377
- (11, authentication, option),
12378
12365
},
12379
12366
(2, ReceiveKeysend) => {
12380
12367
(0, payment_preimage, required),
0 commit comments