Skip to content

Commit 55d2770

Browse files
committed
Correct the reserve minimums in FundingScope::for_splice
The reserve we should maintain on our own transaction should be greater than our own dust limit.
1 parent 85f1b0c commit 55d2770

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2291,12 +2291,12 @@ impl FundingScope {
22912291
.funding_pubkey = counterparty_funding_pubkey;
22922292

22932293
// New reserve values are based on the new channel value and are v2-specific
2294-
let counterparty_selected_channel_reserve_satoshis = Some(get_v2_channel_reserve_satoshis(
2294+
let counterparty_selected_channel_reserve_satoshis =
2295+
Some(get_v2_channel_reserve_satoshis(post_channel_value, MIN_CHAN_DUST_LIMIT_SATOSHIS));
2296+
let holder_selected_channel_reserve_satoshis = get_v2_channel_reserve_satoshis(
22952297
post_channel_value,
22962298
context.counterparty_dust_limit_satoshis,
2297-
));
2298-
let holder_selected_channel_reserve_satoshis =
2299-
get_v2_channel_reserve_satoshis(post_channel_value, MIN_CHAN_DUST_LIMIT_SATOSHIS);
2299+
);
23002300

23012301
Self {
23022302
channel_transaction_parameters: post_channel_transaction_parameters,

0 commit comments

Comments
 (0)