mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
splice: Abort on insufficent funds
If the user does not supply enough funds treat it as an abort instead of a channel warning. Also clean up some indentation while we’re there.
This commit is contained in:
parent
14b63d8927
commit
475d5f8bf9
@ -2970,8 +2970,8 @@ static struct amount_sat check_balances(struct peer *peer,
|
||||
*/
|
||||
if (!amount_msat_add_sat_s64(&funding_amount, funding_amount,
|
||||
peer->splicing->opener_relative))
|
||||
peer_failed_warn(peer->pps, &peer->channel_id,
|
||||
"Unable to add opener funding");
|
||||
splice_abort(peer, "Splice initiator did not provide enough"
|
||||
" funding");
|
||||
if (!amount_msat_add_sat_s64(&out[TX_INITIATOR], out[TX_INITIATOR],
|
||||
peer->splicing->opener_relative))
|
||||
peer_failed_warn(peer->pps, &peer->channel_id,
|
||||
@ -2979,8 +2979,8 @@ static struct amount_sat check_balances(struct peer *peer,
|
||||
|
||||
if (!amount_msat_add_sat_s64(&funding_amount, funding_amount,
|
||||
peer->splicing->accepter_relative))
|
||||
peer_failed_warn(peer->pps, &peer->channel_id,
|
||||
"Unable to add accepter funding");
|
||||
splice_abort(peer, "Splice accepter did not provide enough"
|
||||
" funding");
|
||||
if (!amount_msat_add_sat_s64(&out[TX_ACCEPTER], out[TX_ACCEPTER],
|
||||
peer->splicing->accepter_relative))
|
||||
peer_failed_warn(peer->pps, &peer->channel_id,
|
||||
|
Loading…
Reference in New Issue
Block a user