You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check v2 reserves after funding_contribution_satoshis is applied
We check this when validating `splice_init`, `splice_ack` messages, and
also when validating user-specified contributions.
From BOLT 2:
```
- If `funding_contribution_satoshis` is negative and its absolute value
is greater than the sending node's current channel balance:
- MUST send a `warning` and close the connection or send an `error`
and fail the channel.
```
and further down:
```
If a side does not meet the reserve requirements, that's OK: but if they
take funds out of the channel, they must ensure that they do meet them.
If your peer adds a massive amount to the channel, then you only have
to add more reserve if you want to contribute to the splice (and you
can use `tx_remove_output` and/or `tx_remove_input` part-way through if
this happens).
```
Therefore, we check the v2 reserve anytime
`funding_contribution_satoshis` is not equal to zero.
We allow parties to draw from their previous reserve, as long as they
satisfy their v2 reserve.
0 commit comments