]> git.bitcoin.ninja Git - rust-lightning/commit
Support the `channel_type` feature bit. 2021-12-new-feature-bit
authorMatt Corallo <git@bluematt.me>
Mon, 6 Dec 2021 00:18:59 +0000 (00:18 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 7 Dec 2021 18:05:29 +0000 (18:05 +0000)
commit8f4a22fe310a0a1643a82a5d3e17617da000b912
tree4a18e544f0e8378c90d368dabb97a4815790c30f
parentaa5e5f967375eb31d8b0d0ed7f20ef31242693f7
Support the `channel_type` feature bit.

Note that this feature bit does absolutely nothing. We signal it
(as we already support channel type negotiation), but do not bother
to look to see if peers support it, as we don't care - we simply
look for the TLV entry and deduce if a peer supports channel type
negotiation from that.

The only behavioral change at all here is that we don't barf if a
peer sets channel type negotiation to required via the feature bit
(instead of failing the channel at open-time), but of course no
implementations do this, and likely won't for some time (if ever -
you can simply fail channels with unknown types later, and there's
no reason to refuse connections, really).

As defined in https://github.com/lightning/bolts/pull/906
lightning/src/ln/features.rs