Skip to content

Commit 89c05fb

Browse files
committed
fix Clarification comment regarding change-inclusion in input check
1 parent 562c438 commit 89c05fb

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
@@ -4097,7 +4097,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
40974097

40984098
/// Check that balances meet the channel reserve requirements or violates them (below reserve).
40994099
/// The channel value is an input as opposed to using from self, so that this can be used in case of splicing
4100-
/// to checks with new channel value (before being comitted to it).
4100+
/// to check with new channel value (before being comitted to it).
41014101
#[cfg(splicing)]
41024102
pub fn check_balance_meets_v2_reserve_requirements(&self, self_balance: u64, counterparty_balance: u64, channel_value: u64) -> Result<(), ChannelError> {
41034103
if self_balance > 0 {
@@ -4714,7 +4714,11 @@ pub(super) fn check_v2_funding_inputs_sufficient(
47144714
// If the inputs are less, but enough to cover intended contribution amount, with
47154715
// (lower) fees with no change, we are also fine (change will not be generated).
47164716
// So it's enough to check considering the lower, no-change fees.
4717+
//
47174718
// Note: dust limit is not relevant in this check.
4719+
//
4720+
// TODO(splicing): refine check including the fact wether a change will be added or not.
4721+
// Can be done once dual funding preparation is included.
47184722

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

0 commit comments

Comments
 (0)