Skip to content

Commit b481c17

Browse files
committed
Send fee estimator through to get_max_htlc_dust_exposure_threshold
1 parent a8dd213 commit b481c17

File tree

2 files changed

+83
-51
lines changed

2 files changed

+83
-51
lines changed

lightning/src/ln/channel.rs

+65-37
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,10 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
10691069
cmp::max(self.config.options.cltv_expiry_delta, MIN_CLTV_EXPIRY_DELTA)
10701070
}
10711071

1072-
pub fn get_max_dust_htlc_exposure_msat(&self) -> u64 {
1072+
pub fn get_max_dust_htlc_exposure_msat<F: Deref>(&self,
1073+
_fee_estimator: &LowerBoundedFeeEstimator<F>) -> u64
1074+
where F::Target: FeeEstimator
1075+
{
10731076
self.config.options.max_dust_htlc_exposure_msat
10741077
}
10751078

@@ -1544,7 +1547,9 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
15441547
/// Doesn't bother handling the
15451548
/// if-we-removed-it-already-but-haven't-fully-resolved-they-can-still-send-an-inbound-HTLC
15461549
/// corner case properly.
1547-
pub fn get_available_balances(&self) -> AvailableBalances {
1550+
pub fn get_available_balances<F: Deref>(&self, fee_estimator: &LowerBoundedFeeEstimator<F>) -> AvailableBalances
1551+
where F::Target: FeeEstimator
1552+
{
15481553
let context = &self;
15491554
// Note that we have to handle overflow due to the above case.
15501555
let inbound_stats = context.get_inbound_pending_htlc_stats(None);
@@ -1626,6 +1631,7 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
16261631
// send above the dust limit (as the router can always overpay to meet the dust limit).
16271632
let mut remaining_msat_below_dust_exposure_limit = None;
16281633
let mut dust_exposure_dust_limit_msat = 0;
1634+
let max_dust_htlc_exposure_msat = context.get_max_dust_htlc_exposure_msat(fee_estimator);
16291635

16301636
let (htlc_success_dust_limit, htlc_timeout_dust_limit) = if context.opt_anchors() {
16311637
(context.counterparty_dust_limit_satoshis, context.holder_dust_limit_satoshis)
@@ -1635,17 +1641,17 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
16351641
context.holder_dust_limit_satoshis + dust_buffer_feerate * htlc_timeout_tx_weight(false) / 1000)
16361642
};
16371643
let on_counterparty_dust_htlc_exposure_msat = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat;
1638-
if on_counterparty_dust_htlc_exposure_msat as i64 + htlc_success_dust_limit as i64 * 1000 - 1 > context.get_max_dust_htlc_exposure_msat() as i64 {
1644+
if on_counterparty_dust_htlc_exposure_msat as i64 + htlc_success_dust_limit as i64 * 1000 - 1 > max_dust_htlc_exposure_msat as i64 {
16391645
remaining_msat_below_dust_exposure_limit =
1640-
Some(context.get_max_dust_htlc_exposure_msat().saturating_sub(on_counterparty_dust_htlc_exposure_msat));
1646+
Some(max_dust_htlc_exposure_msat.saturating_sub(on_counterparty_dust_htlc_exposure_msat));
16411647
dust_exposure_dust_limit_msat = cmp::max(dust_exposure_dust_limit_msat, htlc_success_dust_limit * 1000);
16421648
}
16431649

16441650
let on_holder_dust_htlc_exposure_msat = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat;
1645-
if on_holder_dust_htlc_exposure_msat as i64 + htlc_timeout_dust_limit as i64 * 1000 - 1 > context.get_max_dust_htlc_exposure_msat() as i64 {
1651+
if on_holder_dust_htlc_exposure_msat as i64 + htlc_timeout_dust_limit as i64 * 1000 - 1 > max_dust_htlc_exposure_msat as i64 {
16461652
remaining_msat_below_dust_exposure_limit = Some(cmp::min(
16471653
remaining_msat_below_dust_exposure_limit.unwrap_or(u64::max_value()),
1648-
context.get_max_dust_htlc_exposure_msat().saturating_sub(on_holder_dust_htlc_exposure_msat)));
1654+
max_dust_htlc_exposure_msat.saturating_sub(on_holder_dust_htlc_exposure_msat)));
16491655
dust_exposure_dust_limit_msat = cmp::max(dust_exposure_dust_limit_msat, htlc_timeout_dust_limit * 1000);
16501656
}
16511657

@@ -2576,8 +2582,9 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
25762582
Ok(self.get_announcement_sigs(node_signer, genesis_block_hash, user_config, best_block.height(), logger))
25772583
}
25782584

2579-
pub fn update_add_htlc<F, L: Deref>(&mut self, msg: &msgs::UpdateAddHTLC, mut pending_forward_status: PendingHTLCStatus, create_pending_htlc_status: F, logger: &L) -> Result<(), ChannelError>
2580-
where F: for<'a> Fn(&'a Self, PendingHTLCStatus, u16) -> PendingHTLCStatus, L::Target: Logger {
2585+
pub fn update_add_htlc<F, FE: Deref, L: Deref>(&mut self, msg: &msgs::UpdateAddHTLC, mut pending_forward_status: PendingHTLCStatus, create_pending_htlc_status: F, fee_estimator: &LowerBoundedFeeEstimator<FE>, logger: &L) -> Result<(), ChannelError>
2586+
where F: for<'a> Fn(&'a Self, PendingHTLCStatus, u16) -> PendingHTLCStatus,
2587+
FE::Target: FeeEstimator, L::Target: Logger {
25812588
// We can't accept HTLCs sent after we've sent a shutdown.
25822589
let local_sent_shutdown = (self.context.channel_state & (ChannelState::ChannelReady as u32 | ChannelState::LocalShutdownSent as u32)) != (ChannelState::ChannelReady as u32);
25832590
if local_sent_shutdown {
@@ -2630,6 +2637,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
26302637
}
26312638
}
26322639

2640+
let max_dust_htlc_exposure_msat = self.context.get_max_dust_htlc_exposure_msat(fee_estimator);
26332641
let (htlc_timeout_dust_limit, htlc_success_dust_limit) = if self.context.opt_anchors() {
26342642
(0, 0)
26352643
} else {
@@ -2640,19 +2648,19 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
26402648
let exposure_dust_limit_timeout_sats = htlc_timeout_dust_limit + self.context.counterparty_dust_limit_satoshis;
26412649
if msg.amount_msat / 1000 < exposure_dust_limit_timeout_sats {
26422650
let on_counterparty_tx_dust_htlc_exposure_msat = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat + msg.amount_msat;
2643-
if on_counterparty_tx_dust_htlc_exposure_msat > self.context.get_max_dust_htlc_exposure_msat() {
2651+
if on_counterparty_tx_dust_htlc_exposure_msat > max_dust_htlc_exposure_msat {
26442652
log_info!(logger, "Cannot accept value that would put our exposure to dust HTLCs at {} over the limit {} on counterparty commitment tx",
2645-
on_counterparty_tx_dust_htlc_exposure_msat, self.context.get_max_dust_htlc_exposure_msat());
2653+
on_counterparty_tx_dust_htlc_exposure_msat, max_dust_htlc_exposure_msat);
26462654
pending_forward_status = create_pending_htlc_status(self, pending_forward_status, 0x1000|7);
26472655
}
26482656
}
26492657

26502658
let exposure_dust_limit_success_sats = htlc_success_dust_limit + self.context.holder_dust_limit_satoshis;
26512659
if msg.amount_msat / 1000 < exposure_dust_limit_success_sats {
26522660
let on_holder_tx_dust_htlc_exposure_msat = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat + msg.amount_msat;
2653-
if on_holder_tx_dust_htlc_exposure_msat > self.context.get_max_dust_htlc_exposure_msat() {
2661+
if on_holder_tx_dust_htlc_exposure_msat > max_dust_htlc_exposure_msat {
26542662
log_info!(logger, "Cannot accept value that would put our exposure to dust HTLCs at {} over the limit {} on holder commitment tx",
2655-
on_holder_tx_dust_htlc_exposure_msat, self.context.get_max_dust_htlc_exposure_msat());
2663+
on_holder_tx_dust_htlc_exposure_msat, max_dust_htlc_exposure_msat);
26562664
pending_forward_status = create_pending_htlc_status(self, pending_forward_status, 0x1000|7);
26572665
}
26582666
}
@@ -3019,16 +3027,18 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
30193027
/// Public version of the below, checking relevant preconditions first.
30203028
/// If we're not in a state where freeing the holding cell makes sense, this is a no-op and
30213029
/// returns `(None, Vec::new())`.
3022-
pub fn maybe_free_holding_cell_htlcs<L: Deref>(&mut self, logger: &L) -> (Option<&ChannelMonitorUpdate>, Vec<(HTLCSource, PaymentHash)>) where L::Target: Logger {
3030+
pub fn maybe_free_holding_cell_htlcs<F: Deref, L: Deref>(&mut self, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L) -> (Option<&ChannelMonitorUpdate>, Vec<(HTLCSource, PaymentHash)>) where F::Target: FeeEstimator, L::Target: Logger {
30233031
if self.context.channel_state >= ChannelState::ChannelReady as u32 &&
30243032
(self.context.channel_state & (ChannelState::AwaitingRemoteRevoke as u32 | ChannelState::PeerDisconnected as u32 | ChannelState::MonitorUpdateInProgress as u32)) == 0 {
3025-
self.free_holding_cell_htlcs(logger)
3033+
self.free_holding_cell_htlcs(fee_estimator, logger)
30263034
} else { (None, Vec::new()) }
30273035
}
30283036

30293037
/// Frees any pending commitment updates in the holding cell, generating the relevant messages
30303038
/// for our counterparty.
3031-
fn free_holding_cell_htlcs<L: Deref>(&mut self, logger: &L) -> (Option<&ChannelMonitorUpdate>, Vec<(HTLCSource, PaymentHash)>) where L::Target: Logger {
3039+
fn free_holding_cell_htlcs<F: Deref, L: Deref>(&mut self, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L) -> (Option<&ChannelMonitorUpdate>, Vec<(HTLCSource, PaymentHash)>)
3040+
where F::Target: FeeEstimator, L::Target: Logger
3041+
{
30323042
assert_eq!(self.context.channel_state & ChannelState::MonitorUpdateInProgress as u32, 0);
30333043
if self.context.holding_cell_htlc_updates.len() != 0 || self.context.holding_cell_update_fee.is_some() {
30343044
log_trace!(logger, "Freeing holding cell with {} HTLC updates{} in channel {}", self.context.holding_cell_htlc_updates.len(),
@@ -3053,7 +3063,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
30533063
// to rebalance channels.
30543064
match &htlc_update {
30553065
&HTLCUpdateAwaitingACK::AddHTLC {amount_msat, cltv_expiry, ref payment_hash, ref source, ref onion_routing_packet, ..} => {
3056-
match self.send_htlc(amount_msat, *payment_hash, cltv_expiry, source.clone(), onion_routing_packet.clone(), false, logger) {
3066+
match self.send_htlc(amount_msat, *payment_hash, cltv_expiry, source.clone(), onion_routing_packet.clone(), false, fee_estimator, logger) {
30573067
Ok(update_add_msg_option) => update_add_htlcs.push(update_add_msg_option.unwrap()),
30583068
Err(e) => {
30593069
match e {
@@ -3112,7 +3122,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
31123122
return (None, htlcs_to_fail);
31133123
}
31143124
let update_fee = if let Some(feerate) = self.context.holding_cell_update_fee.take() {
3115-
self.send_update_fee(feerate, false, logger)
3125+
self.send_update_fee(feerate, false, fee_estimator, logger)
31163126
} else {
31173127
None
31183128
};
@@ -3139,8 +3149,8 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
31393149
/// waiting on this revoke_and_ack. The generation of this new commitment_signed may also fail,
31403150
/// generating an appropriate error *after* the channel state has been updated based on the
31413151
/// revoke_and_ack message.
3142-
pub fn revoke_and_ack<L: Deref>(&mut self, msg: &msgs::RevokeAndACK, logger: &L) -> Result<(Vec<(HTLCSource, PaymentHash)>, Option<&ChannelMonitorUpdate>), ChannelError>
3143-
where L::Target: Logger,
3152+
pub fn revoke_and_ack<F: Deref, L: Deref>(&mut self, msg: &msgs::RevokeAndACK, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L) -> Result<(Vec<(HTLCSource, PaymentHash)>, Option<&ChannelMonitorUpdate>), ChannelError>
3153+
where F::Target: FeeEstimator, L::Target: Logger,
31443154
{
31453155
if (self.context.channel_state & (ChannelState::ChannelReady as u32)) != (ChannelState::ChannelReady as u32) {
31463156
return Err(ChannelError::Close("Got revoke/ACK message when channel was not in an operational state".to_owned()));
@@ -3340,7 +3350,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
33403350
return Ok((Vec::new(), self.push_ret_blockable_mon_update(monitor_update)));
33413351
}
33423352

3343-
match self.free_holding_cell_htlcs(logger) {
3353+
match self.free_holding_cell_htlcs(fee_estimator, logger) {
33443354
(Some(_), htlcs_to_fail) => {
33453355
let mut additional_update = self.context.pending_monitor_updates.pop().unwrap().update;
33463356
// free_holding_cell_htlcs may bump latest_monitor_id multiple times but we want them to be
@@ -3376,8 +3386,11 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
33763386
/// Queues up an outbound update fee by placing it in the holding cell. You should call
33773387
/// [`Self::maybe_free_holding_cell_htlcs`] in order to actually generate and send the
33783388
/// commitment update.
3379-
pub fn queue_update_fee<L: Deref>(&mut self, feerate_per_kw: u32, logger: &L) where L::Target: Logger {
3380-
let msg_opt = self.send_update_fee(feerate_per_kw, true, logger);
3389+
pub fn queue_update_fee<F: Deref, L: Deref>(&mut self, feerate_per_kw: u32,
3390+
fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L)
3391+
where F::Target: FeeEstimator, L::Target: Logger
3392+
{
3393+
let msg_opt = self.send_update_fee(feerate_per_kw, true, fee_estimator, logger);
33813394
assert!(msg_opt.is_none(), "We forced holding cell?");
33823395
}
33833396

@@ -3388,7 +3401,9 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
33883401
///
33893402
/// You MUST call [`Self::send_commitment_no_state_update`] prior to any other calls on this
33903403
/// [`Channel`] if `force_holding_cell` is false.
3391-
fn send_update_fee<L: Deref>(&mut self, feerate_per_kw: u32, mut force_holding_cell: bool, logger: &L) -> Option<msgs::UpdateFee> where L::Target: Logger {
3404+
fn send_update_fee<F: Deref, L: Deref>(&mut self, feerate_per_kw: u32, mut force_holding_cell: bool, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L) -> Option<msgs::UpdateFee>
3405+
where F::Target: FeeEstimator, L::Target: Logger
3406+
{
33923407
if !self.context.is_outbound() {
33933408
panic!("Cannot send fee from inbound channel");
33943409
}
@@ -3415,11 +3430,12 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
34153430
// Note, we evaluate pending htlc "preemptive" trimmed-to-dust threshold at the proposed `feerate_per_kw`.
34163431
let holder_tx_dust_exposure = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat;
34173432
let counterparty_tx_dust_exposure = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat;
3418-
if holder_tx_dust_exposure > self.context.get_max_dust_htlc_exposure_msat() {
3433+
let max_dust_htlc_exposure_msat = self.context.get_max_dust_htlc_exposure_msat(fee_estimator);
3434+
if holder_tx_dust_exposure > max_dust_htlc_exposure_msat {
34193435
log_debug!(logger, "Cannot afford to send new feerate at {} without infringing max dust htlc exposure", feerate_per_kw);
34203436
return None;
34213437
}
3422-
if counterparty_tx_dust_exposure > self.context.get_max_dust_htlc_exposure_msat() {
3438+
if counterparty_tx_dust_exposure > max_dust_htlc_exposure_msat {
34233439
log_debug!(logger, "Cannot afford to send new feerate at {} without infringing max dust htlc exposure", feerate_per_kw);
34243440
return None;
34253441
}
@@ -3656,11 +3672,12 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
36563672
let outbound_stats = self.context.get_outbound_pending_htlc_stats(None);
36573673
let holder_tx_dust_exposure = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat;
36583674
let counterparty_tx_dust_exposure = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat;
3659-
if holder_tx_dust_exposure > self.context.get_max_dust_htlc_exposure_msat() {
3675+
let max_dust_htlc_exposure_msat = self.context.get_max_dust_htlc_exposure_msat(fee_estimator);
3676+
if holder_tx_dust_exposure > max_dust_htlc_exposure_msat {
36603677
return Err(ChannelError::Close(format!("Peer sent update_fee with a feerate ({}) which may over-expose us to dust-in-flight on our own transactions (totaling {} msat)",
36613678
msg.feerate_per_kw, holder_tx_dust_exposure)));
36623679
}
3663-
if counterparty_tx_dust_exposure > self.context.get_max_dust_htlc_exposure_msat() {
3680+
if counterparty_tx_dust_exposure > max_dust_htlc_exposure_msat {
36643681
return Err(ChannelError::Close(format!("Peer sent update_fee with a feerate ({}) which may over-expose us to dust-in-flight on our counterparty's transactions (totaling {} msat)",
36653682
msg.feerate_per_kw, counterparty_tx_dust_exposure)));
36663683
}
@@ -5042,11 +5059,15 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
50425059
/// commitment update.
50435060
///
50445061
/// `Err`s will only be [`ChannelError::Ignore`].
5045-
pub fn queue_add_htlc<L: Deref>(&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
5046-
onion_routing_packet: msgs::OnionPacket, logger: &L)
5047-
-> Result<(), ChannelError> where L::Target: Logger {
5062+
pub fn queue_add_htlc<F: Deref, L: Deref>(&mut self, amount_msat: u64,
5063+
payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
5064+
onion_routing_packet: msgs::OnionPacket, fee_estimator: &LowerBoundedFeeEstimator<F>,
5065+
logger: &L) -> Result<(), ChannelError>
5066+
where F::Target: FeeEstimator, L::Target: Logger
5067+
{
50485068
self
5049-
.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, true, logger)
5069+
.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, true,
5070+
fee_estimator, logger)
50505071
.map(|msg_opt| assert!(msg_opt.is_none(), "We forced holding cell?"))
50515072
.map_err(|err| {
50525073
if let ChannelError::Ignore(_) = err { /* fine */ }
@@ -5071,9 +5092,11 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
50715092
/// on this [`Channel`] if `force_holding_cell` is false.
50725093
///
50735094
/// `Err`s will only be [`ChannelError::Ignore`].
5074-
fn send_htlc<L: Deref>(&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
5075-
onion_routing_packet: msgs::OnionPacket, mut force_holding_cell: bool, logger: &L)
5076-
-> Result<Option<msgs::UpdateAddHTLC>, ChannelError> where L::Target: Logger {
5095+
fn send_htlc<F: Deref, L: Deref>(&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
5096+
onion_routing_packet: msgs::OnionPacket, mut force_holding_cell: bool, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L)
5097+
-> Result<Option<msgs::UpdateAddHTLC>, ChannelError>
5098+
where F::Target: FeeEstimator, L::Target: Logger
5099+
{
50775100
if (self.context.channel_state & (ChannelState::ChannelReady as u32 | BOTH_SIDES_SHUTDOWN_MASK)) != (ChannelState::ChannelReady as u32) {
50785101
return Err(ChannelError::Ignore("Cannot send HTLC until channel is fully established and we haven't started shutting down".to_owned()));
50795102
}
@@ -5086,7 +5109,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
50865109
return Err(ChannelError::Ignore("Cannot send 0-msat HTLC".to_owned()));
50875110
}
50885111

5089-
let available_balances = self.context.get_available_balances();
5112+
let available_balances = self.context.get_available_balances(fee_estimator);
50905113
if amount_msat < available_balances.next_outbound_htlc_minimum_msat {
50915114
return Err(ChannelError::Ignore(format!("Cannot send less than our next-HTLC minimum - {} msat",
50925115
available_balances.next_outbound_htlc_minimum_msat)));
@@ -5283,8 +5306,13 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
52835306
///
52845307
/// Shorthand for calling [`Self::send_htlc`] followed by a commitment update, see docs on
52855308
/// [`Self::send_htlc`] and [`Self::build_commitment_no_state_update`] for more info.
5286-
pub fn send_htlc_and_commit<L: Deref>(&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource, onion_routing_packet: msgs::OnionPacket, logger: &L) -> Result<Option<&ChannelMonitorUpdate>, ChannelError> where L::Target: Logger {
5287-
let send_res = self.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, false, logger);
5309+
pub fn send_htlc_and_commit<F: Deref, L: Deref>(&mut self, amount_msat: u64,
5310+
payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
5311+
onion_routing_packet: msgs::OnionPacket, fee_estimator: &LowerBoundedFeeEstimator<F>,
5312+
logger: &L) -> Result<Option<&ChannelMonitorUpdate>, ChannelError>
5313+
where F::Target: FeeEstimator, L::Target: Logger
5314+
{
5315+
let send_res = self.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, false, fee_estimator, logger);
52885316
if let Err(e) = &send_res { if let ChannelError::Ignore(_) = e {} else { debug_assert!(false, "Sending cannot trigger channel failure"); } }
52895317
match send_res? {
52905318
Some(_) => {

0 commit comments

Comments
 (0)