Skip to content

Commit

Permalink
Merge pull request #1631 from dunxen/2022-07-disabledflags
Browse files Browse the repository at this point in the history
Specify why flags for `channel_disabled` error are zero
  • Loading branch information
liveseed authored and coderm73 committed Jul 26, 2022
2 parents d0ee7de + 492432f commit debe15a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lightning/src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3794,7 +3794,8 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
if let Ok(upd) = self.get_channel_update_for_onion(scid, chan) {
let mut enc = VecWriter(Vec::with_capacity(upd.serialized_length() + 6));
if desired_err_code == 0x1000 | 20 {
// TODO: underspecified, follow https://github.com/lightning/bolts/issues/791
// No flags for `disabled_flags` are currently defined so they're always two zero bytes.
// See https://github.com/lightning/bolts/blob/341ec84/04-onion-routing.md?plain=1#L1008
0u16.write(&mut enc).expect("Writes cannot fail");
}
(upd.serialized_length() as u16 + 2).write(&mut enc).expect("Writes cannot fail");
Expand Down

0 comments on commit debe15a

Please sign in to comment.