Skip to content

Commit

Permalink
Echo channel_type in accept_channel
Browse files Browse the repository at this point in the history
One argument for adding a feature bit for channel types was to make things
more explicit and remove ambiguity.

When sending `open_channel`, we require funders to include a `channel_type`,
so it would make sense to require fundees to echo that `channel_type`
back to explicitly confirm that they're ok with this `channel_type`.
  • Loading branch information
t-bast authored and niftynei committed Mar 14, 2022
1 parent e60d594 commit 32a76e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 02-peer-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ The sender:
avoid double-spending of the funding transaction.
- MUST set `channel_reserve_satoshis` greater than or equal to `dust_limit_satoshis` from the `open_channel` message.
- MUST set `dust_limit_satoshis` less than or equal to `channel_reserve_satoshis` from the `open_channel` message.
- if it sets `channel_type`:
- MUST set it to the `channel_type` from `open_channel`
- if `option_channel_type` was negotiated:
- MUST set `channel_type` to the `channel_type` from `open_channel`

The receiver:
- if `minimum_depth` is unreasonably large:
Expand All @@ -360,6 +360,8 @@ The receiver:
- MUST reject the channel.
- if `channel_type` is set, and `channel_type` was set in `open_channel`, and they are not equal types:
- MUST reject the channel.
- if `option_channel_type` was negotiated but the message doesn't include a `channel_type`:
- MAY reject the channel.

Other fields have the same requirements as their counterparts in `open_channel`.

Expand Down

0 comments on commit 32a76e8

Please sign in to comment.