X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fmsgs.rs;h=004bd3d99d318e2458f41e9c31307614afb93b5f;hb=5b28744755a4a5ef0303c9cbf927502495194055;hp=3042b4d32e0a344e185ef9756654aefa759606aa;hpb=4894d52d30399c21b7994952a8de0d1d7848c58d;p=rust-lightning diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index 3042b4d3..004bd3d9 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -543,7 +543,14 @@ pub struct UnsignedChannelUpdate { pub timestamp: u32, /// Channel flags pub flags: u8, - /// The number of blocks to subtract from incoming HTLC cltv_expiry values + /// The number of blocks such that if: + /// `incoming_htlc.cltv_expiry < outgoing_htlc.cltv_expiry + cltv_expiry_delta` + /// then we need to fail the HTLC backwards. When forwarding an HTLC, cltv_expiry_delta determines + /// the outgoing HTLC's minimum cltv_expiry value -- so, if an incoming HTLC comes in with a + /// cltv_expiry of 100000, and the node we're forwarding to has a cltv_expiry_delta value of 10, + /// then we'll check that the outgoing HTLC's cltv_expiry value is at least 100010 before + /// forwarding. Note that the HTLC sender is the one who originally sets this value when + /// constructing the route. pub cltv_expiry_delta: u16, /// The minimum HTLC size incoming to sender, in milli-satoshi pub htlc_minimum_msat: u64,