@@ -9664,7 +9664,9 @@ impl_writeable_tlv_based!(HTLCPreviousHopData, {
9664
9664
(4, htlc_id, required),
9665
9665
(6, incoming_packet_shared_secret, required),
9666
9666
(7, user_channel_id, option),
9667
- (8, channel_id, required),
9667
+ // Note that by the time we get past the required read for type 2 above, outpoint will be
9668
+ // filled in, so we can safely unwrap it here.
9669
+ (9, channel_id, (default_value, ChannelId::v1_from_funding_outpoint(outpoint.0.unwrap()))),
9668
9670
});
9669
9671
9670
9672
impl Writeable for ClaimableHTLC {
@@ -9816,7 +9818,9 @@ impl_writeable_tlv_based!(PendingAddHTLCInfo, {
9816
9818
(2, prev_short_channel_id, required),
9817
9819
(4, prev_htlc_id, required),
9818
9820
(6, prev_funding_outpoint, required),
9819
- (8, prev_channel_id, required),
9821
+ // Note that by the time we get past the required read for type 2 above, prev_funding_outpoint will be
9822
+ // filled in, so we can safely unwrap it here.
9823
+ (7, prev_channel_id, (default_value, ChannelId::v1_from_funding_outpoint(prev_funding_outpoint.0.unwrap()))),
9820
9824
});
9821
9825
9822
9826
impl Writeable for HTLCForwardInfo {
0 commit comments