]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Support receiving custom TLVs to blinded paths.
authorValentine Wallace <vwallace@protonmail.com>
Wed, 27 Mar 2024 20:41:25 +0000 (16:41 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Wed, 27 Mar 2024 20:47:32 +0000 (16:47 -0400)
lightning/src/ln/msgs.rs
lightning/src/ln/onion_payment.rs

index 89dff492067ed3c1b3dfa3b2dd9ea07b02f93ecc..2088c51fb5b038baad52a61951c89ab8e48bd255 100644 (file)
@@ -1701,6 +1701,7 @@ mod fuzzy_internal_msgs {
                        payment_constraints: PaymentConstraints,
                        intro_node_blinding_point: Option<PublicKey>,
                        keysend_preimage: Option<PaymentPreimage>,
+                       custom_tlvs: Vec<(u64, Vec<u8>)>,
                }
        }
 
@@ -2683,6 +2684,7 @@ impl<NS: Deref> ReadableArgs<(Option<PublicKey>, &NS)> for InboundOnionPayload w
                                                payment_constraints,
                                                intro_node_blinding_point,
                                                keysend_preimage,
+                                               custom_tlvs,
                                        })
                                },
                        }
index 8a721a8614bf149b40385970e3ffcdad177a2481..a5560e2802014ce23eb2568979c2e301762a0995 100644 (file)
@@ -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())
                }