From: Valentine Wallace Date: Wed, 27 Mar 2024 20:41:25 +0000 (-0400) Subject: Support receiving custom TLVs to blinded paths. X-Git-Tag: v0.0.123-beta~20^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=143b8b361580bcb47b2d7f499a9dcc78cb126f8b;p=rust-lightning Support receiving custom TLVs to blinded paths. --- diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index 89dff4920..2088c51fb 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -1701,6 +1701,7 @@ mod fuzzy_internal_msgs { payment_constraints: PaymentConstraints, intro_node_blinding_point: Option, keysend_preimage: Option, + custom_tlvs: Vec<(u64, Vec)>, } } @@ -2683,6 +2684,7 @@ impl ReadableArgs<(Option, &NS)> for InboundOnionPayload w payment_constraints, intro_node_blinding_point, keysend_preimage, + custom_tlvs, }) }, } diff --git a/lightning/src/ln/onion_payment.rs b/lightning/src/ln/onion_payment.rs index 8a721a861..a5560e280 100644 --- a/lightning/src/ln/onion_payment.rs +++ b/lightning/src/ln/onion_payment.rs @@ -139,7 +139,7 @@ pub(super) fn create_recv_pending_htlc_info( cltv_expiry_height, payment_metadata, false), msgs::InboundOnionPayload::BlindedReceive { sender_intended_htlc_amt_msat, total_msat, cltv_expiry_height, payment_secret, - intro_node_blinding_point, payment_constraints, keysend_preimage, .. + intro_node_blinding_point, payment_constraints, keysend_preimage, custom_tlvs } => { check_blinded_payment_constraints( sender_intended_htlc_amt_msat, cltv_expiry, &payment_constraints @@ -152,7 +152,7 @@ pub(super) fn create_recv_pending_htlc_info( } })?; let payment_data = msgs::FinalOnionHopData { payment_secret, total_msat }; - (Some(payment_data), keysend_preimage, Vec::new(), + (Some(payment_data), keysend_preimage, custom_tlvs, sender_intended_htlc_amt_msat, cltv_expiry_height, None, intro_node_blinding_point.is_none()) }