Skip to content

Commit

Permalink
f specify default channel_id for HTLCPreviousHopData & HTLCAddHTLCInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
dunxen committed Jan 22, 2024
1 parent 5bcc885 commit a3dc944
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lightning/src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9664,7 +9664,9 @@ impl_writeable_tlv_based!(HTLCPreviousHopData, {
(4, htlc_id, required),
(6, incoming_packet_shared_secret, required),
(7, user_channel_id, option),
(8, channel_id, required),
// Note that by the time we get past the required read for type 2 above, outpoint will be
// filled in, so we can safely unwrap it here.
(9, channel_id, (default_value, ChannelId::v1_from_funding_outpoint(outpoint.0.unwrap()))),
});

impl Writeable for ClaimableHTLC {
Expand Down Expand Up @@ -9816,7 +9818,9 @@ impl_writeable_tlv_based!(PendingAddHTLCInfo, {
(2, prev_short_channel_id, required),
(4, prev_htlc_id, required),
(6, prev_funding_outpoint, required),
(8, prev_channel_id, required),
// Note that by the time we get past the required read for type 2 above, prev_funding_outpoint will be
// filled in, so we can safely unwrap it here.
(7, prev_channel_id, (default_value, ChannelId::v1_from_funding_outpoint(prev_funding_outpoint.0.unwrap()))),
});

impl Writeable for HTLCForwardInfo {
Expand Down

0 comments on commit a3dc944

Please sign in to comment.