From aace2d3e24600049eb26f3e18a150f5fa63a21cc Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Wed, 13 Dec 2023 17:22:50 -0500 Subject: [PATCH] Rename OutboundOnionPayload::BlindedReceive::outgoing_cltv_value. There is no outgoing HTLC for received HTLCs, so rename to be more accurate. --- lightning/src/ln/msgs.rs | 7 +++---- lightning/src/ln/onion_utils.rs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index c0d19df53..78702a3b8 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -1748,7 +1748,7 @@ mod fuzzy_internal_msgs { BlindedReceive { amt_msat: u64, total_msat: u64, - outgoing_cltv_value: u32, + cltv_expiry_height: u32, encrypted_tlvs: Vec, intro_node_blinding_point: Option, // Set if the introduction node of the blinded path is the final node } @@ -2312,12 +2312,11 @@ impl Writeable for OutboundOnionPayload { }); }, Self::BlindedReceive { - amt_msat, total_msat, outgoing_cltv_value, encrypted_tlvs, - intro_node_blinding_point, + amt_msat, total_msat, cltv_expiry_height, encrypted_tlvs, intro_node_blinding_point, } => { _encode_varint_length_prefixed_tlv!(w, { (2, HighZeroBytesDroppedBigSize(*amt_msat), required), - (4, HighZeroBytesDroppedBigSize(*outgoing_cltv_value), required), + (4, HighZeroBytesDroppedBigSize(*cltv_expiry_height), required), (10, *encrypted_tlvs, required_vec), (12, intro_node_blinding_point, option), (18, HighZeroBytesDroppedBigSize(*total_msat), required) diff --git a/lightning/src/ln/onion_utils.rs b/lightning/src/ln/onion_utils.rs index 840ada4d1..a83f9dc5a 100644 --- a/lightning/src/ln/onion_utils.rs +++ b/lightning/src/ln/onion_utils.rs @@ -192,7 +192,7 @@ pub(super) fn build_onion_payloads(path: &Path, total_msat: u64, mut recipient_o res.push(msgs::OutboundOnionPayload::BlindedReceive { amt_msat: *final_value_msat, total_msat, - outgoing_cltv_value: cltv, + cltv_expiry_height: cltv, encrypted_tlvs: blinded_hop.encrypted_payload.clone(), intro_node_blinding_point: blinding_point.take(), }); -- 2.39.5