Skip to content

Commit d1c2e14

Browse files
committed
Note when new HTLC state can be None
1 parent 8296515 commit d1c2e14

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,14 @@ pub struct InboundHTLCDetails {
247247
/// The payment hash.
248248
pub payment_hash: PaymentHash,
249249
/// The state of the HTLC in the state machine.
250+
///
250251
/// Determines on which commitment transactions the HTLC is included and what message the HTLC is
251252
/// waiting for to advance to the next state.
253+
///
252254
/// See [`InboundHTLCStateDetails`] for information on the specific states.
255+
///
256+
/// LDK will always fill this field in, but when downgrading to prior versions of LDK, new
257+
/// states may result in `None` here.
253258
pub state: Option<InboundHTLCStateDetails>,
254259
/// Whether the HTLC has an output below the local dust limit. If so, the output will be trimmed
255260
/// from the local commitment transaction and added to the commitment transaction fee.
@@ -428,9 +433,14 @@ pub struct OutboundHTLCDetails {
428433
/// The payment hash.
429434
pub payment_hash: PaymentHash,
430435
/// The state of the HTLC in the state machine.
436+
///
431437
/// Determines on which commitment transactions the HTLC is included and what message the HTLC is
432438
/// waiting for to advance to the next state.
439+
///
433440
/// See [`OutboundHTLCStateDetails`] for information on the specific states.
441+
///
442+
/// LDK will always fill this field in, but when downgrading to prior versions of LDK, new
443+
/// states may result in `None` here.
434444
pub state: Option<OutboundHTLCStateDetails>,
435445
/// The extra fee being skimmed off the top of this HTLC.
436446
pub skimmed_fee_msat: Option<u64>,

0 commit comments

Comments
 (0)