@@ -4097,7 +4097,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
4097
4097
4098
4098
/// Check that balances meet the channel reserve requirements or violates them (below reserve).
4099
4099
/// 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).
4101
4101
#[cfg(splicing)]
4102
4102
pub fn check_balance_meets_v2_reserve_requirements(&self, self_balance: u64, counterparty_balance: u64, channel_value: u64) -> Result<(), ChannelError> {
4103
4103
if self_balance > 0 {
@@ -4714,7 +4714,11 @@ pub(super) fn check_v2_funding_inputs_sufficient(
4714
4714
// If the inputs are less, but enough to cover intended contribution amount, with
4715
4715
// (lower) fees with no change, we are also fine (change will not be generated).
4716
4716
// So it's enough to check considering the lower, no-change fees.
4717
+ //
4717
4718
// 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.
4718
4722
4719
4723
let minimal_input_amount_needed = contribution_amount.saturating_add(estimated_fee as i64);
4720
4724
if (total_input_sats as i64) < minimal_input_amount_needed {
@@ -12987,7 +12991,7 @@ mod tests {
12987
12991
);
12988
12992
assert_eq!(
12989
12993
format!("{:?}", res.err().unwrap()),
12990
- "Warn : Total input amount 100000 is lower than needed for contribution 220000, considering fees of 1410. Need more inputs.",
12994
+ "Warn: Total input amount 100000 is lower than needed for contribution 220000, considering fees of 1410. Need more inputs.",
12991
12995
);
12992
12996
}
12993
12997
@@ -13023,7 +13027,7 @@ mod tests {
13023
13027
);
13024
13028
assert_eq!(
13025
13029
format!("{:?}", res.err().unwrap()),
13026
- "Warn : Total input amount 300000 is lower than needed for contribution 298032, considering fees of 2143. Need more inputs.",
13030
+ "Warn: Total input amount 300000 is lower than needed for contribution 298032, considering fees of 2143. Need more inputs.",
13027
13031
);
13028
13032
}
13029
13033
0 commit comments