]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add TODO noting confusion over |20 (channel_disabled) definition
authorMatt Corallo <git@bluematt.me>
Mon, 17 Dec 2018 19:46:17 +0000 (14:46 -0500)
committerMatt Corallo <git@bluematt.me>
Tue, 18 Dec 2018 03:55:45 +0000 (22:55 -0500)
src/ln/channelmanager.rs

index 4fe2a1c7cb652e1ba63d307746ac6f09c7e4f20f..b8eef0339efec3ad7b3055b2cf2676d052bd22e8 100644 (file)
@@ -2087,6 +2087,11 @@ impl ChannelManager {
                                                        channel_id: msg.channel_id,
                                                        htlc_id: msg.htlc_id,
                                                        reason: if let Ok(update) = chan_update {
+                                                               // TODO: Note that |20 is defined as "channel FROM the processing
+                                                               // node has been disabled" (emphasis mine), which seems to imply
+                                                               // that we can't return |20 for an inbound channel being disabled.
+                                                               // This probably needs a spec update but should definitely be
+                                                               // allowed.
                                                                ChannelManager::build_first_hop_failure_packet(&incoming_shared_secret, 0x1000|20, &{
                                                                        let mut res = Vec::with_capacity(8 + 128);
                                                                        res.extend_from_slice(&byte_utils::be16_to_array(update.contents.flags));