Skip to content

Commit 492432f

Browse files
liveseedcoderm73
authored and
coderm73
committed
Specify why flags for channel_disabled error are zero
We can remove the TODO for this and specify why the flags are zero as it's now fully specified in BOLT 4. See https://github.com/lightning/bolts/blob/341ec84/04-onion-routing.md?plain=1#L1008
1 parent d0ee7de commit 492432f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightning/src/ln/channelmanager.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3794,7 +3794,8 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
37943794
if let Ok(upd) = self.get_channel_update_for_onion(scid, chan) {
37953795
let mut enc = VecWriter(Vec::with_capacity(upd.serialized_length() + 6));
37963796
if desired_err_code == 0x1000 | 20 {
3797-
// TODO: underspecified, follow https://github.com/lightning/bolts/issues/791
3797+
// No flags for `disabled_flags` are currently defined so they're always two zero bytes.
3798+
// See https://github.com/lightning/bolts/blob/341ec84/04-onion-routing.md?plain=1#L1008
37983799
0u16.write(&mut enc).expect("Writes cannot fail");
37993800
}
38003801
(upd.serialized_length() as u16 + 2).write(&mut enc).expect("Writes cannot fail");

0 commit comments

Comments
 (0)