Skip to content

Commit bac2af7

Browse files
committed
fix Clarification comment regarding change-inclusion in input check
1 parent 01c27a1 commit bac2af7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4015,7 +4015,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
40154015

40164016
/// Check that balances meet the channel reserve requirements or violates them (below reserve).
40174017
/// The channel value is an input as opposed to using from self, so that this can be used in case of splicing
4018-
/// to checks with new channel value (before being comitted to it).
4018+
/// to check with new channel value (before being comitted to it).
40194019
#[cfg(splicing)]
40204020
pub fn check_balance_meets_v2_reserve_requirements(&self, self_balance: u64, counterparty_balance: u64, channel_value: u64) -> Result<(), ChannelError> {
40214021
if self_balance > 0 {
@@ -4632,7 +4632,11 @@ pub(super) fn check_v2_funding_inputs_sufficient(
46324632
// If the inputs are less, but enough to cover intended contribution amount, with
46334633
// (lower) fees with no change, we are also fine (change will not be generated).
46344634
// So it's enough to check considering the lower, no-change fees.
4635+
//
46354636
// Note: dust limit is not relevant in this check.
4637+
//
4638+
// TODO(splicing): refine check including the fact wether a change will be added or not.
4639+
// Can be done once dual funding preparation is included.
46364640

46374641
let minimal_input_amount_needed = contribution_amount.saturating_add(estimated_fee as i64);
46384642
if (total_input_sats as i64) < minimal_input_amount_needed {

0 commit comments

Comments
 (0)