Skip to content

Commit 10e213c

Browse files
committed
Replace send_htlc amount checking with available balances
Now that the `get_available_balances` min/max bounds are exact, we can stop doing all the explicit checks in `send_htlc` entirely, instead comparing against the `get_available_balances` bounds and failing if the amount is out of those bounds. This breaks support for sending amounts below the dust limit if there is some amount of dust exposure remaining before we hit our cap, however we will no longer generate such routes anyway.
1 parent 66c4f45 commit 10e213c

File tree

4 files changed

+26
-142
lines changed

4 files changed

+26
-142
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,8 @@ fn check_api_err(api_err: APIError, sendable_bounds_violated: bool) {
296296
// is probably just stale and you should add new messages here.
297297
match err.as_str() {
298298
"Peer for first hop currently disconnected" => {},
299-
_ if err.starts_with("Cannot push more than their max accepted HTLCs ") => {},
300-
_ if err.starts_with("Cannot send value that would put us over the max HTLC value in flight our peer will accept ") => {},
301-
_ if err.starts_with("Cannot send value that would put our balance under counterparty-announced channel reserve value") => {},
302-
_ if err.starts_with("Cannot send value that would put counterparty balance under holder-announced channel reserve value") => {},
303-
_ if err.starts_with("Cannot send value that would overdraw remaining funds.") => {},
304-
_ if err.starts_with("Cannot send value that would not leave enough to pay for fees.") => {},
305-
_ if err.starts_with("Cannot send value that would put our exposure to dust HTLCs at") => {},
299+
_ if err.starts_with("Cannot send less than our next-HTLC minimum - ") => {},
300+
_ if err.starts_with("Cannot send more than our next-HTLC maximum - ") => {},
306301
_ => panic!("{}", err),
307302
}
308303
assert!(sendable_bounds_violated);

lightning/src/ln/channel.rs

Lines changed: 9 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -5936,9 +5936,15 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
59365936
return Err(ChannelError::Ignore("Cannot send 0-msat HTLC".to_owned()));
59375937
}
59385938

5939-
if amount_msat < self.counterparty_htlc_minimum_msat {
5940-
debug_assert!(amount_msat < self.get_available_balances().next_outbound_htlc_minimum_msat);
5941-
return Err(ChannelError::Ignore(format!("Cannot send less than their minimum HTLC value ({})", self.counterparty_htlc_minimum_msat)));
5939+
let available_balances = self.get_available_balances();
5940+
if amount_msat < available_balances.next_outbound_htlc_minimum_msat {
5941+
return Err(ChannelError::Ignore(format!("Cannot send less than our next-HTLC minimum - {} msat",
5942+
available_balances.next_outbound_htlc_minimum_msat)));
5943+
}
5944+
5945+
if amount_msat > available_balances.next_outbound_htlc_limit_msat {
5946+
return Err(ChannelError::Ignore(format!("Cannot send more than our next-HTLC maximum - {} msat",
5947+
available_balances.next_outbound_htlc_limit_msat)));
59425948
}
59435949

59445950
if (self.channel_state & (ChannelState::PeerDisconnected as u32)) != 0 {
@@ -5951,86 +5957,6 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
59515957
return Err(ChannelError::Ignore("Cannot send an HTLC while disconnected from channel counterparty".to_owned()));
59525958
}
59535959

5954-
let inbound_stats = self.get_inbound_pending_htlc_stats(None);
5955-
let outbound_stats = self.get_outbound_pending_htlc_stats(None);
5956-
if outbound_stats.pending_htlcs + 1 > self.counterparty_max_accepted_htlcs as u32 {
5957-
debug_assert!(amount_msat > self.get_available_balances().next_outbound_htlc_limit_msat);
5958-
return Err(ChannelError::Ignore(format!("Cannot push more than their max accepted HTLCs ({})", self.counterparty_max_accepted_htlcs)));
5959-
}
5960-
// Check their_max_htlc_value_in_flight_msat
5961-
if outbound_stats.pending_htlcs_value_msat + amount_msat > self.counterparty_max_htlc_value_in_flight_msat {
5962-
debug_assert!(amount_msat > self.get_available_balances().next_outbound_htlc_limit_msat);
5963-
return Err(ChannelError::Ignore(format!("Cannot send value that would put us over the max HTLC value in flight our peer will accept ({})", self.counterparty_max_htlc_value_in_flight_msat)));
5964-
}
5965-
5966-
if !self.is_outbound() {
5967-
// Check that we won't violate the remote channel reserve by adding this HTLC.
5968-
let htlc_candidate = HTLCCandidate::new(amount_msat, HTLCInitiator::LocalOffered);
5969-
let counterparty_commit_tx_fee_msat = self.next_remote_commit_tx_fee_msat(htlc_candidate, None);
5970-
let holder_selected_chan_reserve_msat = self.holder_selected_channel_reserve_satoshis * 1000;
5971-
let remote_balance_msat = (self.channel_value_satoshis * 1000 - self.value_to_self_msat).saturating_sub(inbound_stats.pending_htlcs_value_msat);
5972-
if remote_balance_msat < counterparty_commit_tx_fee_msat + holder_selected_chan_reserve_msat {
5973-
debug_assert!(amount_msat > self.get_available_balances().next_outbound_htlc_limit_msat);
5974-
return Err(ChannelError::Ignore("Cannot send value that would put counterparty balance under holder-announced channel reserve value".to_owned()));
5975-
}
5976-
}
5977-
5978-
let (htlc_success_dust_limit, htlc_timeout_dust_limit) = if self.opt_anchors() {
5979-
(0, 0)
5980-
} else {
5981-
let dust_buffer_feerate = self.get_dust_buffer_feerate(None) as u64;
5982-
(dust_buffer_feerate * htlc_success_tx_weight(false) / 1000,
5983-
dust_buffer_feerate * htlc_timeout_tx_weight(false) / 1000)
5984-
};
5985-
let exposure_dust_limit_success_sats = htlc_success_dust_limit + self.counterparty_dust_limit_satoshis;
5986-
if amount_msat / 1000 < exposure_dust_limit_success_sats {
5987-
let on_counterparty_dust_htlc_exposure_msat = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat + amount_msat;
5988-
if on_counterparty_dust_htlc_exposure_msat > self.get_max_dust_htlc_exposure_msat() {
5989-
debug_assert!(amount_msat > self.get_available_balances().next_outbound_htlc_limit_msat ||
5990-
amount_msat < self.get_available_balances().next_outbound_htlc_minimum_msat);
5991-
return Err(ChannelError::Ignore(format!("Cannot send value that would put our exposure to dust HTLCs at {} over the limit {} on counterparty commitment tx",
5992-
on_counterparty_dust_htlc_exposure_msat, self.get_max_dust_htlc_exposure_msat())));
5993-
}
5994-
}
5995-
5996-
let exposure_dust_limit_timeout_sats = htlc_timeout_dust_limit + self.holder_dust_limit_satoshis;
5997-
if amount_msat / 1000 < exposure_dust_limit_timeout_sats {
5998-
let on_holder_dust_htlc_exposure_msat = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat + amount_msat;
5999-
if on_holder_dust_htlc_exposure_msat > self.get_max_dust_htlc_exposure_msat() {
6000-
debug_assert!(amount_msat > self.get_available_balances().next_outbound_htlc_limit_msat ||
6001-
amount_msat < self.get_available_balances().next_outbound_htlc_minimum_msat);
6002-
return Err(ChannelError::Ignore(format!("Cannot send value that would put our exposure to dust HTLCs at {} over the limit {} on holder commitment tx",
6003-
on_holder_dust_htlc_exposure_msat, self.get_max_dust_htlc_exposure_msat())));
6004-
}
6005-
}
6006-
6007-
let holder_balance_msat = self.value_to_self_msat
6008-
.saturating_sub(outbound_stats.pending_htlcs_value_msat);
6009-
if holder_balance_msat < amount_msat {
6010-
debug_assert!(amount_msat > self.get_available_balances().next_outbound_htlc_limit_msat);
6011-
return Err(ChannelError::Ignore(format!("Cannot send value that would overdraw remaining funds. Amount: {}, pending value to self {}", amount_msat, holder_balance_msat)));
6012-
}
6013-
6014-
// `2 *` and extra HTLC are for the fee spike buffer.
6015-
let commit_tx_fee_msat = if self.is_outbound() {
6016-
let htlc_candidate = HTLCCandidate::new(amount_msat, HTLCInitiator::LocalOffered);
6017-
FEE_SPIKE_BUFFER_FEE_INCREASE_MULTIPLE * self.next_local_commit_tx_fee_msat(htlc_candidate, Some(()))
6018-
} else { 0 };
6019-
if holder_balance_msat - amount_msat < commit_tx_fee_msat {
6020-
debug_assert!(amount_msat > self.get_available_balances().next_outbound_htlc_limit_msat);
6021-
return Err(ChannelError::Ignore(format!("Cannot send value that would not leave enough to pay for fees. Pending value to self: {}. local_commit_tx_fee {}", holder_balance_msat, commit_tx_fee_msat)));
6022-
}
6023-
6024-
// Check self.counterparty_selected_channel_reserve_satoshis (the amount we must keep as
6025-
// reserve for the remote to have something to claim if we misbehave)
6026-
let chan_reserve_msat = self.counterparty_selected_channel_reserve_satoshis.unwrap() * 1000;
6027-
if holder_balance_msat - amount_msat - commit_tx_fee_msat < chan_reserve_msat {
6028-
debug_assert!(amount_msat > self.get_available_balances().next_outbound_htlc_limit_msat);
6029-
return Err(ChannelError::Ignore(format!("Cannot send value that would put our balance under counterparty-announced channel reserve value ({})", chan_reserve_msat)));
6030-
}
6031-
6032-
debug_assert!(amount_msat <= self.get_available_balances().next_outbound_htlc_limit_msat);
6033-
60345960
let need_holding_cell = (self.channel_state & (ChannelState::AwaitingRemoteRevoke as u32 | ChannelState::MonitorUpdateInProgress as u32)) != 0;
60355961
log_debug!(logger, "Pushing new outbound HTLC for {} msat {}", amount_msat,
60365962
if force_holding_cell { "into holding cell" }

lightning/src/ln/functional_tests.rs

Lines changed: 13 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,10 +1125,8 @@ fn holding_cell_htlc_counting() {
11251125
{
11261126
unwrap_send_err!(nodes[1].node.send_payment_with_route(&route, payment_hash_1,
11271127
RecipientOnionFields::secret_only(payment_secret_1), PaymentId(payment_hash_1.0)
1128-
), true, APIError::ChannelUnavailable { ref err },
1129-
assert!(regex::Regex::new(r"Cannot push more than their max accepted HTLCs \(\d+\)").unwrap().is_match(err)));
1128+
), true, APIError::ChannelUnavailable { .. }, {});
11301129
assert!(nodes[1].node.get_and_clear_pending_msg_events().is_empty());
1131-
nodes[1].logger.assert_log_contains("lightning::ln::channelmanager", "Cannot push more than their max accepted HTLCs", 1);
11321130
}
11331131

11341132
// This should also be true if we try to forward a payment.
@@ -1351,16 +1349,12 @@ fn test_basic_channel_reserve() {
13511349
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)).err().unwrap();
13521350
match err {
13531351
PaymentSendFailure::AllFailedResendSafe(ref fails) => {
1354-
match &fails[0] {
1355-
&APIError::ChannelUnavailable{ref err} =>
1356-
assert!(regex::Regex::new(r"Cannot send value that would put our balance under counterparty-announced channel reserve value \(\d+\)").unwrap().is_match(err)),
1357-
_ => panic!("Unexpected error variant"),
1358-
}
1352+
if let &APIError::ChannelUnavailable { .. } = &fails[0] {}
1353+
else { panic!("Unexpected error variant"); }
13591354
},
13601355
_ => panic!("Unexpected error variant"),
13611356
}
13621357
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
1363-
nodes[0].logger.assert_log_contains("lightning::ln::channelmanager", "Cannot send value that would put our balance under counterparty-announced channel reserve value", 1);
13641358

13651359
send_payment(&nodes[0], &vec![&nodes[1]], max_can_send);
13661360
}
@@ -1537,10 +1531,8 @@ fn test_chan_reserve_violation_outbound_htlc_inbound_chan() {
15371531
// However one more HTLC should be significantly over the reserve amount and fail.
15381532
unwrap_send_err!(nodes[1].node.send_payment_with_route(&route, our_payment_hash,
15391533
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)
1540-
), true, APIError::ChannelUnavailable { ref err },
1541-
assert_eq!(err, "Cannot send value that would put counterparty balance under holder-announced channel reserve value"));
1534+
), true, APIError::ChannelUnavailable { .. }, {});
15421535
assert!(nodes[1].node.get_and_clear_pending_msg_events().is_empty());
1543-
nodes[1].logger.assert_log("lightning::ln::channelmanager".to_string(), "Cannot send value that would put counterparty balance under holder-announced channel reserve value".to_string(), 1);
15441536
}
15451537

15461538
#[test]
@@ -1635,8 +1627,7 @@ fn test_chan_reserve_dust_inbound_htlcs_outbound_chan() {
16351627
route.paths[0].hops[0].fee_msat += 1;
16361628
unwrap_send_err!(nodes[1].node.send_payment_with_route(&route, our_payment_hash,
16371629
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)
1638-
), true, APIError::ChannelUnavailable { ref err },
1639-
assert_eq!(err, "Cannot send value that would put counterparty balance under holder-announced channel reserve value"));
1630+
), true, APIError::ChannelUnavailable { .. }, {});
16401631
}
16411632

16421633
#[test]
@@ -1844,10 +1835,8 @@ fn test_channel_reserve_holding_cell_htlcs() {
18441835

18451836
unwrap_send_err!(nodes[0].node.send_payment_with_route(&route, our_payment_hash,
18461837
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)
1847-
), true, APIError::ChannelUnavailable { ref err },
1848-
assert!(regex::Regex::new(r"Cannot send value that would put us over the max HTLC value in flight our peer will accept \(\d+\)").unwrap().is_match(err)));
1838+
), true, APIError::ChannelUnavailable { .. }, {});
18491839
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
1850-
nodes[0].logger.assert_log_contains("lightning::ln::channelmanager", "Cannot send value that would put us over the max HTLC value in flight our peer will accept", 1);
18511840
}
18521841

18531842
// channel reserve is bigger than their_max_htlc_value_in_flight_msat so loop to deplete
@@ -1918,8 +1907,7 @@ fn test_channel_reserve_holding_cell_htlcs() {
19181907
let (_, our_payment_hash, our_payment_secret) = get_payment_preimage_hash!(nodes[2]);
19191908
unwrap_send_err!(nodes[0].node.send_payment_with_route(&route, our_payment_hash,
19201909
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)
1921-
), true, APIError::ChannelUnavailable { ref err },
1922-
assert!(regex::Regex::new(r"Cannot send value that would put our balance under counterparty-announced channel reserve value \(\d+\)").unwrap().is_match(err)));
1910+
), true, APIError::ChannelUnavailable { .. }, {});
19231911
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
19241912
}
19251913

@@ -1949,10 +1937,8 @@ fn test_channel_reserve_holding_cell_htlcs() {
19491937
route.paths[0].hops.last_mut().unwrap().fee_msat += 1;
19501938
unwrap_send_err!(nodes[0].node.send_payment_with_route(&route, our_payment_hash,
19511939
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)
1952-
), true, APIError::ChannelUnavailable { ref err },
1953-
assert!(regex::Regex::new(r"Cannot send value that would put our balance under counterparty-announced channel reserve value \(\d+\)").unwrap().is_match(err)));
1940+
), true, APIError::ChannelUnavailable { .. }, {});
19541941
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
1955-
nodes[0].logger.assert_log_contains("lightning::ln::channelmanager", "Cannot send value that would put our balance under counterparty-announced channel reserve value", 2);
19561942
}
19571943

19581944
let (route_22, our_payment_hash_22, our_payment_preimage_22, our_payment_secret_22) = get_route_and_payment_hash!(nodes[0], nodes[2], recv_value_22);
@@ -5735,9 +5721,6 @@ fn test_fail_holding_cell_htlc_upon_free() {
57355721
chan_stat = get_channel_value_stat!(nodes[0], nodes[1], chan.2);
57365722
assert_eq!(chan_stat.holding_cell_outbound_amount_msat, 0);
57375723
nodes[0].logger.assert_log("lightning::ln::channel".to_string(), format!("Freeing holding cell with 1 HTLC updates in channel {}", hex::encode(chan.2)), 1);
5738-
let failure_log = format!("Failed to send HTLC with payment_hash {} due to Cannot send value that would put our balance under counterparty-announced channel reserve value ({}) in channel {}",
5739-
hex::encode(our_payment_hash.0), chan_stat.channel_reserve_msat, hex::encode(chan.2));
5740-
nodes[0].logger.assert_log("lightning::ln::channel".to_string(), failure_log.to_string(), 1);
57415724

57425725
// Check that the payment failed to be sent out.
57435726
let events = nodes[0].node.get_and_clear_pending_events();
@@ -5826,9 +5809,6 @@ fn test_free_and_fail_holding_cell_htlcs() {
58265809
chan_stat = get_channel_value_stat!(nodes[0], nodes[1], chan.2);
58275810
assert_eq!(chan_stat.holding_cell_outbound_amount_msat, 0);
58285811
nodes[0].logger.assert_log("lightning::ln::channel".to_string(), format!("Freeing holding cell with 2 HTLC updates in channel {}", hex::encode(chan.2)), 1);
5829-
let failure_log = format!("Failed to send HTLC with payment_hash {} due to Cannot send value that would put our balance under counterparty-announced channel reserve value ({}) in channel {}",
5830-
hex::encode(payment_hash_2.0), chan_stat.channel_reserve_msat, hex::encode(chan.2));
5831-
nodes[0].logger.assert_log("lightning::ln::channel".to_string(), failure_log.to_string(), 1);
58325812

58335813
// Check that the second payment failed to be sent out.
58345814
let events = nodes[0].node.get_and_clear_pending_events();
@@ -6037,10 +6017,8 @@ fn test_update_add_htlc_bolt2_sender_value_below_minimum_msat() {
60376017

60386018
unwrap_send_err!(nodes[0].node.send_payment_with_route(&route, our_payment_hash,
60396019
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)
6040-
), true, APIError::ChannelUnavailable { ref err },
6041-
assert!(regex::Regex::new(r"Cannot send less than their minimum HTLC value \(\d+\)").unwrap().is_match(err)));
6020+
), true, APIError::ChannelUnavailable { .. }, {});
60426021
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
6043-
nodes[0].logger.assert_log_contains("lightning::ln::channelmanager", "Cannot send less than their minimum HTLC value", 1);
60446022
}
60456023

60466024
#[test]
@@ -6146,11 +6124,9 @@ fn test_update_add_htlc_bolt2_sender_exceed_max_htlc_num_and_htlc_id_increment()
61466124
}
61476125
unwrap_send_err!(nodes[0].node.send_payment_with_route(&route, our_payment_hash,
61486126
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)
6149-
), true, APIError::ChannelUnavailable { ref err },
6150-
assert!(regex::Regex::new(r"Cannot push more than their max accepted HTLCs \(\d+\)").unwrap().is_match(err)));
6127+
), true, APIError::ChannelUnavailable { .. }, {});
61516128

61526129
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
6153-
nodes[0].logger.assert_log_contains("lightning::ln::channelmanager", "Cannot push more than their max accepted HTLCs", 1);
61546130
}
61556131

61566132
#[test]
@@ -6172,11 +6148,8 @@ fn test_update_add_htlc_bolt2_sender_exceed_max_htlc_value_in_flight() {
61726148
route.paths[0].hops[0].fee_msat = max_in_flight + 1;
61736149
unwrap_send_err!(nodes[0].node.send_payment_with_route(&route, our_payment_hash,
61746150
RecipientOnionFields::secret_only(our_payment_secret), PaymentId(our_payment_hash.0)
6175-
), true, APIError::ChannelUnavailable { ref err },
6176-
assert!(regex::Regex::new(r"Cannot send value that would put us over the max HTLC value in flight our peer will accept \(\d+\)").unwrap().is_match(err)));
6177-
6151+
), true, APIError::ChannelUnavailable { .. }, {});
61786152
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
6179-
nodes[0].logger.assert_log_contains("lightning::ln::channelmanager", "Cannot send value that would put us over the max HTLC value in flight our peer will accept", 1);
61806153

61816154
send_payment(&nodes[0], &[&nodes[1]], max_in_flight);
61826155
}
@@ -9693,23 +9666,15 @@ fn do_test_max_dust_htlc_exposure(dust_outbound_balance: bool, exposure_breach_e
96939666
if exposure_breach_event == ExposureEvent::AtHTLCForward {
96949667
route.paths[0].hops.last_mut().unwrap().fee_msat =
96959668
if on_holder_tx { dust_outbound_htlc_on_holder_tx_msat } else { dust_htlc_on_counterparty_tx_msat + 1 };
9696-
let mut config = UserConfig::default();
96979669
// With default dust exposure: 5000 sats
96989670
if on_holder_tx {
9699-
let dust_outbound_overflow = dust_outbound_htlc_on_holder_tx_msat * (dust_outbound_htlc_on_holder_tx + 1);
9700-
let dust_inbound_overflow = dust_inbound_htlc_on_holder_tx_msat * dust_inbound_htlc_on_holder_tx + dust_outbound_htlc_on_holder_tx_msat;
97019671
unwrap_send_err!(nodes[0].node.send_payment_with_route(&route, payment_hash,
97029672
RecipientOnionFields::secret_only(payment_secret), PaymentId(payment_hash.0)
9703-
), true, APIError::ChannelUnavailable { ref err },
9704-
assert_eq!(err, &format!("Cannot send value that would put our exposure to dust HTLCs at {} over the limit {} on holder commitment tx", if dust_outbound_balance { dust_outbound_overflow } else { dust_inbound_overflow }, config.channel_config.max_dust_htlc_exposure_msat)));
9673+
), true, APIError::ChannelUnavailable { .. }, {});
97059674
} else {
97069675
unwrap_send_err!(nodes[0].node.send_payment_with_route(&route, payment_hash,
97079676
RecipientOnionFields::secret_only(payment_secret), PaymentId(payment_hash.0)
9708-
), true, APIError::ChannelUnavailable { ref err },
9709-
assert_eq!(err,
9710-
&format!("Cannot send value that would put our exposure to dust HTLCs at {} over the limit {} on counterparty commitment tx",
9711-
dust_htlc_on_counterparty_tx_msat * (dust_htlc_on_counterparty_tx - 1) + dust_htlc_on_counterparty_tx_msat + 1,
9712-
config.channel_config.max_dust_htlc_exposure_msat)));
9677+
), true, APIError::ChannelUnavailable { .. }, {});
97139678
}
97149679
} else if exposure_breach_event == ExposureEvent::AtHTLCReception {
97159680
let (route, payment_hash, _, payment_secret) = get_route_and_payment_hash!(nodes[1], nodes[0], if on_holder_tx { dust_inbound_htlc_on_holder_tx_msat } else { dust_htlc_on_counterparty_tx_msat + 1 });

0 commit comments

Comments
 (0)