Skip to content

Commit

Permalink
Apply suggestions by @rustyrussell
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bast committed Jun 25, 2021
1 parent 1684acc commit 9ee62c4
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions 02-peer-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,11 @@ the other node then replies similarly, using a fee it thinks is fair. This
exchange continues until both agree on the same fee or when one side fails
the channel.

In the modern method, the funder sends its permissable fee range, and the
non-funder has to pick a fee in this range. If it chooses the same value,
negotiation is complete after two messages, otherwise the funder will reply
with the same value (completing after three messages).

1. type: 39 (`closing_signed`)
2. data:
* [`channel_id`:`channel_id`]
Expand Down Expand Up @@ -589,10 +594,20 @@ The receiving node:
and the channel does not use `option_anchor_outputs`:
- MUST fail the connection.
- if the message contains a `fee_range`:
- if it disagrees with that `fee_range`:
- if there is no overlap between that and its own `fee_range`:
- SHOULD fail the connection
- otherwise:
- MUST propose a `fee_satoshis` in that range
- if it is the funder:
- if `fee_satoshis` is not in the overlap between the sent and received `fee_range`:
- SHOULD fail the connection
- otherwise:
- MUST reply with the same `fee_satoshis`.
- otherwise (it is not the funder):
- if it has already sent a `closing_signed`:
- if `fee_satoshis` is not the same as the value it sent:
- SHOULD fail the connection.
- otherwise:
- MUST propose a `fee_satoshis` in the overlap between received and (about-to-be) sent `fee_range`.
- otherwise, if `fee_satoshis` is not strictly between its last-sent `fee_satoshis`
and its previously-received `fee_satoshis`, UNLESS it has since reconnected:
- SHOULD fail the connection.
Expand Down

0 comments on commit 9ee62c4

Please sign in to comment.