Skip to content

Commit fad983e

Browse files
committed
Add the current channel setting flags for channel_disabled onion error
1 parent 700c83d commit fad983e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ln/channelmanager.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,12 @@ impl ChannelManager {
20392039
channel_id: msg.channel_id,
20402040
htlc_id: msg.htlc_id,
20412041
reason: if let Ok(update) = chan_update {
2042-
ChannelManager::build_first_hop_failure_packet(&incoming_shared_secret, 0x1000|20, &update.encode_with_len()[..])
2042+
ChannelManager::build_first_hop_failure_packet(&incoming_shared_secret, 0x1000|20, &{
2043+
let mut res = Vec::with_capacity(8 + 128);
2044+
res.extend_from_slice(&byte_utils::be16_to_array(update.contents.flags));
2045+
res.extend_from_slice(&update.encode_with_len()[..]);
2046+
res
2047+
}[..])
20432048
} else {
20442049
// This can only happen if the channel isn't in the fully-funded
20452050
// state yet, implying our counterparty is trying to route payments

0 commit comments

Comments
 (0)