Skip to content

Commit 85a02ca

Browse files
committed
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.
1 parent b5cf08d commit 85a02ca

File tree

2 files changed

+183
-137
lines changed

2 files changed

+183
-137
lines changed

0 commit comments

Comments
 (0)