Skip to content
Merged
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
8 changes: 8 additions & 0 deletions lightning/src/ln/channel_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,12 @@ pub struct ChannelDetails {

/// The largest RGB value HTLC we currently will accept, for this channel.
pub inbound_htlc_maximum_rgb: u64,

/// Whether the channel was negotiated as an RGB (colored) channel.
///
/// Known from the first message (`open_channel`) on, so unlike the RGB channel info on disk it
/// is already set for a channel that is still being funded.
pub is_colored: bool,
}

impl ChannelDetails {
Expand Down Expand Up @@ -604,6 +610,7 @@ impl ChannelDetails {
pending_outbound_htlcs: context.get_pending_outbound_htlc_details(funding),
next_outbound_htlc_limit_rgb: context.get_local_rgb_amount(),
inbound_htlc_maximum_rgb: context.get_remote_rgb_amount(),
is_colored: context.is_colored(),
}
}
}
Expand Down Expand Up @@ -649,6 +656,7 @@ impl_writeable_tlv_based!(ChannelDetails, {
)),
(48, next_outbound_htlc_limit_rgb, required),
(50, inbound_htlc_maximum_rgb, required),
(52, is_colored, required),
});

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
Expand Down
Loading