Skip to content

Small comment tweaks #2878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lightning/src/chain/channelmonitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3172,7 +3172,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
(htlc, htlc_source.as_ref().map(|htlc_source| htlc_source.as_ref()))
), logger);
} else {
// Our fuzzers aren't contrained by pesky things like valid signatures, so can
// Our fuzzers aren't constrained by pesky things like valid signatures, so can
// spend our funding output with a transaction which doesn't match our past
// commitment transactions. Thus, we can only debug-assert here when not
// fuzzing.
Expand Down
10 changes: 10 additions & 0 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,14 @@ pub struct InboundHTLCDetails {
/// The payment hash.
pub payment_hash: PaymentHash,
/// The state of the HTLC in the state machine.
///
/// Determines on which commitment transactions the HTLC is included and what message the HTLC is
/// waiting for to advance to the next state.
///
/// See [`InboundHTLCStateDetails`] for information on the specific states.
///
/// LDK will always fill this field in, but when downgrading to prior versions of LDK, new
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we include the specific version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no specific version. Its entirely speculative.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also consider making it not an Option, but then we'd fail to read a ChannelDetails just because of an upgrade.

/// states may result in `None` here.
pub state: Option<InboundHTLCStateDetails>,
/// Whether the HTLC has an output below the local dust limit. If so, the output will be trimmed
/// from the local commitment transaction and added to the commitment transaction fee.
Expand Down Expand Up @@ -428,9 +433,14 @@ pub struct OutboundHTLCDetails {
/// The payment hash.
pub payment_hash: PaymentHash,
/// The state of the HTLC in the state machine.
///
/// Determines on which commitment transactions the HTLC is included and what message the HTLC is
/// waiting for to advance to the next state.
///
/// See [`OutboundHTLCStateDetails`] for information on the specific states.
///
/// LDK will always fill this field in, but when downgrading to prior versions of LDK, new
/// states may result in `None` here.
pub state: Option<OutboundHTLCStateDetails>,
/// The extra fee being skimmed off the top of this HTLC.
pub skimmed_fee_msat: Option<u64>,
Expand Down