Skip to content

Commit c2992fd

Browse files
committed
Send fee estimator through to get_max_htlc_dust_exposure_threshold
1 parent cfc7ec6 commit c2992fd

File tree

3 files changed

+103
-56
lines changed

3 files changed

+103
-56
lines changed

lightning/src/ln/channel.rs

+81-40
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,10 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
10591059
cmp::max(self.config.options.cltv_expiry_delta, MIN_CLTV_EXPIRY_DELTA)
10601060
}
10611061

1062-
pub fn get_max_dust_htlc_exposure_msat(&self) -> u64 {
1062+
pub fn get_max_dust_htlc_exposure_msat<F: Deref>(&self,
1063+
_fee_estimator: &LowerBoundedFeeEstimator<F>) -> u64
1064+
where F::Target: FeeEstimator
1065+
{
10631066
match self.config.options.max_dust_htlc_exposure {
10641067
MaxDustHTLCExposure::FixedLimitMsat(limit) => limit,
10651068
MaxDustHTLCExposure::FeeRateMultiplier(_) => 5_000_000,
@@ -1536,7 +1539,10 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
15361539
/// Doesn't bother handling the
15371540
/// if-we-removed-it-already-but-haven't-fully-resolved-they-can-still-send-an-inbound-HTLC
15381541
/// corner case properly.
1539-
pub fn get_available_balances(&self) -> AvailableBalances {
1542+
pub fn get_available_balances<F: Deref>(&self, fee_estimator: &LowerBoundedFeeEstimator<F>)
1543+
-> AvailableBalances
1544+
where F::Target: FeeEstimator
1545+
{
15401546
let context = &self;
15411547
// Note that we have to handle overflow due to the above case.
15421548
let inbound_stats = context.get_inbound_pending_htlc_stats(None);
@@ -1618,6 +1624,7 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
16181624
// send above the dust limit (as the router can always overpay to meet the dust limit).
16191625
let mut remaining_msat_below_dust_exposure_limit = None;
16201626
let mut dust_exposure_dust_limit_msat = 0;
1627+
let max_dust_htlc_exposure_msat = context.get_max_dust_htlc_exposure_msat(fee_estimator);
16211628

16221629
let (htlc_success_dust_limit, htlc_timeout_dust_limit) = if context.get_channel_type().supports_anchors_zero_fee_htlc_tx() {
16231630
(context.counterparty_dust_limit_satoshis, context.holder_dust_limit_satoshis)
@@ -1627,17 +1634,17 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
16271634
context.holder_dust_limit_satoshis + dust_buffer_feerate * htlc_timeout_tx_weight(context.get_channel_type()) / 1000)
16281635
};
16291636
let on_counterparty_dust_htlc_exposure_msat = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat;
1630-
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 {
1637+
if on_counterparty_dust_htlc_exposure_msat as i64 + htlc_success_dust_limit as i64 * 1000 - 1 > max_dust_htlc_exposure_msat as i64 {
16311638
remaining_msat_below_dust_exposure_limit =
1632-
Some(context.get_max_dust_htlc_exposure_msat().saturating_sub(on_counterparty_dust_htlc_exposure_msat));
1639+
Some(max_dust_htlc_exposure_msat.saturating_sub(on_counterparty_dust_htlc_exposure_msat));
16331640
dust_exposure_dust_limit_msat = cmp::max(dust_exposure_dust_limit_msat, htlc_success_dust_limit * 1000);
16341641
}
16351642

16361643
let on_holder_dust_htlc_exposure_msat = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat;
1637-
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 {
1644+
if on_holder_dust_htlc_exposure_msat as i64 + htlc_timeout_dust_limit as i64 * 1000 - 1 > max_dust_htlc_exposure_msat as i64 {
16381645
remaining_msat_below_dust_exposure_limit = Some(cmp::min(
16391646
remaining_msat_below_dust_exposure_limit.unwrap_or(u64::max_value()),
1640-
context.get_max_dust_htlc_exposure_msat().saturating_sub(on_holder_dust_htlc_exposure_msat)));
1647+
max_dust_htlc_exposure_msat.saturating_sub(on_holder_dust_htlc_exposure_msat)));
16411648
dust_exposure_dust_limit_msat = cmp::max(dust_exposure_dust_limit_msat, htlc_timeout_dust_limit * 1000);
16421649
}
16431650

@@ -2555,8 +2562,13 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
25552562
Ok(self.get_announcement_sigs(node_signer, genesis_block_hash, user_config, best_block.height(), logger))
25562563
}
25572564

2558-
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>
2559-
where F: for<'a> Fn(&'a Self, PendingHTLCStatus, u16) -> PendingHTLCStatus, L::Target: Logger {
2565+
pub fn update_add_htlc<F, FE: Deref, L: Deref>(
2566+
&mut self, msg: &msgs::UpdateAddHTLC, mut pending_forward_status: PendingHTLCStatus,
2567+
create_pending_htlc_status: F, fee_estimator: &LowerBoundedFeeEstimator<FE>, logger: &L
2568+
) -> Result<(), ChannelError>
2569+
where F: for<'a> Fn(&'a Self, PendingHTLCStatus, u16) -> PendingHTLCStatus,
2570+
FE::Target: FeeEstimator, L::Target: Logger,
2571+
{
25602572
// We can't accept HTLCs sent after we've sent a shutdown.
25612573
let local_sent_shutdown = (self.context.channel_state & (ChannelState::ChannelReady as u32 | ChannelState::LocalShutdownSent as u32)) != (ChannelState::ChannelReady as u32);
25622574
if local_sent_shutdown {
@@ -2609,6 +2621,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
26092621
}
26102622
}
26112623

2624+
let max_dust_htlc_exposure_msat = self.context.get_max_dust_htlc_exposure_msat(fee_estimator);
26122625
let (htlc_timeout_dust_limit, htlc_success_dust_limit) = if self.context.get_channel_type().supports_anchors_zero_fee_htlc_tx() {
26132626
(0, 0)
26142627
} else {
@@ -2619,19 +2632,19 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
26192632
let exposure_dust_limit_timeout_sats = htlc_timeout_dust_limit + self.context.counterparty_dust_limit_satoshis;
26202633
if msg.amount_msat / 1000 < exposure_dust_limit_timeout_sats {
26212634
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;
2622-
if on_counterparty_tx_dust_htlc_exposure_msat > self.context.get_max_dust_htlc_exposure_msat() {
2635+
if on_counterparty_tx_dust_htlc_exposure_msat > max_dust_htlc_exposure_msat {
26232636
log_info!(logger, "Cannot accept value that would put our exposure to dust HTLCs at {} over the limit {} on counterparty commitment tx",
2624-
on_counterparty_tx_dust_htlc_exposure_msat, self.context.get_max_dust_htlc_exposure_msat());
2637+
on_counterparty_tx_dust_htlc_exposure_msat, max_dust_htlc_exposure_msat);
26252638
pending_forward_status = create_pending_htlc_status(self, pending_forward_status, 0x1000|7);
26262639
}
26272640
}
26282641

26292642
let exposure_dust_limit_success_sats = htlc_success_dust_limit + self.context.holder_dust_limit_satoshis;
26302643
if msg.amount_msat / 1000 < exposure_dust_limit_success_sats {
26312644
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;
2632-
if on_holder_tx_dust_htlc_exposure_msat > self.context.get_max_dust_htlc_exposure_msat() {
2645+
if on_holder_tx_dust_htlc_exposure_msat > max_dust_htlc_exposure_msat {
26332646
log_info!(logger, "Cannot accept value that would put our exposure to dust HTLCs at {} over the limit {} on holder commitment tx",
2634-
on_holder_tx_dust_htlc_exposure_msat, self.context.get_max_dust_htlc_exposure_msat());
2647+
on_holder_tx_dust_htlc_exposure_msat, max_dust_htlc_exposure_msat);
26352648
pending_forward_status = create_pending_htlc_status(self, pending_forward_status, 0x1000|7);
26362649
}
26372650
}
@@ -2998,16 +3011,24 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
29983011
/// Public version of the below, checking relevant preconditions first.
29993012
/// If we're not in a state where freeing the holding cell makes sense, this is a no-op and
30003013
/// returns `(None, Vec::new())`.
3001-
pub fn maybe_free_holding_cell_htlcs<L: Deref>(&mut self, logger: &L) -> (Option<ChannelMonitorUpdate>, Vec<(HTLCSource, PaymentHash)>) where L::Target: Logger {
3014+
pub fn maybe_free_holding_cell_htlcs<F: Deref, L: Deref>(
3015+
&mut self, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
3016+
) -> (Option<ChannelMonitorUpdate>, Vec<(HTLCSource, PaymentHash)>)
3017+
where F::Target: FeeEstimator, L::Target: Logger
3018+
{
30023019
if self.context.channel_state >= ChannelState::ChannelReady as u32 &&
30033020
(self.context.channel_state & (ChannelState::AwaitingRemoteRevoke as u32 | ChannelState::PeerDisconnected as u32 | ChannelState::MonitorUpdateInProgress as u32)) == 0 {
3004-
self.free_holding_cell_htlcs(logger)
3021+
self.free_holding_cell_htlcs(fee_estimator, logger)
30053022
} else { (None, Vec::new()) }
30063023
}
30073024

30083025
/// Frees any pending commitment updates in the holding cell, generating the relevant messages
30093026
/// for our counterparty.
3010-
fn free_holding_cell_htlcs<L: Deref>(&mut self, logger: &L) -> (Option<ChannelMonitorUpdate>, Vec<(HTLCSource, PaymentHash)>) where L::Target: Logger {
3027+
fn free_holding_cell_htlcs<F: Deref, L: Deref>(
3028+
&mut self, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
3029+
) -> (Option<ChannelMonitorUpdate>, Vec<(HTLCSource, PaymentHash)>)
3030+
where F::Target: FeeEstimator, L::Target: Logger
3031+
{
30113032
assert_eq!(self.context.channel_state & ChannelState::MonitorUpdateInProgress as u32, 0);
30123033
if self.context.holding_cell_htlc_updates.len() != 0 || self.context.holding_cell_update_fee.is_some() {
30133034
log_trace!(logger, "Freeing holding cell with {} HTLC updates{} in channel {}", self.context.holding_cell_htlc_updates.len(),
@@ -3036,7 +3057,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
30363057
skimmed_fee_msat, ..
30373058
} => {
30383059
match self.send_htlc(amount_msat, *payment_hash, cltv_expiry, source.clone(),
3039-
onion_routing_packet.clone(), false, skimmed_fee_msat, logger)
3060+
onion_routing_packet.clone(), false, skimmed_fee_msat, fee_estimator, logger)
30403061
{
30413062
Ok(update_add_msg_option) => update_add_htlcs.push(update_add_msg_option.unwrap()),
30423063
Err(e) => {
@@ -3096,7 +3117,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
30963117
return (None, htlcs_to_fail);
30973118
}
30983119
let update_fee = if let Some(feerate) = self.context.holding_cell_update_fee.take() {
3099-
self.send_update_fee(feerate, false, logger)
3120+
self.send_update_fee(feerate, false, fee_estimator, logger)
31003121
} else {
31013122
None
31023123
};
@@ -3123,8 +3144,10 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
31233144
/// waiting on this revoke_and_ack. The generation of this new commitment_signed may also fail,
31243145
/// generating an appropriate error *after* the channel state has been updated based on the
31253146
/// revoke_and_ack message.
3126-
pub fn revoke_and_ack<L: Deref>(&mut self, msg: &msgs::RevokeAndACK, logger: &L) -> Result<(Vec<(HTLCSource, PaymentHash)>, Option<ChannelMonitorUpdate>), ChannelError>
3127-
where L::Target: Logger,
3147+
pub fn revoke_and_ack<F: Deref, L: Deref>(&mut self, msg: &msgs::RevokeAndACK,
3148+
fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
3149+
) -> Result<(Vec<(HTLCSource, PaymentHash)>, Option<ChannelMonitorUpdate>), ChannelError>
3150+
where F::Target: FeeEstimator, L::Target: Logger,
31283151
{
31293152
if (self.context.channel_state & (ChannelState::ChannelReady as u32)) != (ChannelState::ChannelReady as u32) {
31303153
return Err(ChannelError::Close("Got revoke/ACK message when channel was not in an operational state".to_owned()));
@@ -3324,7 +3347,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
33243347
return Ok((Vec::new(), self.push_ret_blockable_mon_update(monitor_update)));
33253348
}
33263349

3327-
match self.free_holding_cell_htlcs(logger) {
3350+
match self.free_holding_cell_htlcs(fee_estimator, logger) {
33283351
(Some(mut additional_update), htlcs_to_fail) => {
33293352
// free_holding_cell_htlcs may bump latest_monitor_id multiple times but we want them to be
33303353
// strictly increasing by one, so decrement it here.
@@ -3359,8 +3382,11 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
33593382
/// Queues up an outbound update fee by placing it in the holding cell. You should call
33603383
/// [`Self::maybe_free_holding_cell_htlcs`] in order to actually generate and send the
33613384
/// commitment update.
3362-
pub fn queue_update_fee<L: Deref>(&mut self, feerate_per_kw: u32, logger: &L) where L::Target: Logger {
3363-
let msg_opt = self.send_update_fee(feerate_per_kw, true, logger);
3385+
pub fn queue_update_fee<F: Deref, L: Deref>(&mut self, feerate_per_kw: u32,
3386+
fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L)
3387+
where F::Target: FeeEstimator, L::Target: Logger
3388+
{
3389+
let msg_opt = self.send_update_fee(feerate_per_kw, true, fee_estimator, logger);
33643390
assert!(msg_opt.is_none(), "We forced holding cell?");
33653391
}
33663392

@@ -3371,7 +3397,12 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
33713397
///
33723398
/// You MUST call [`Self::send_commitment_no_state_update`] prior to any other calls on this
33733399
/// [`Channel`] if `force_holding_cell` is false.
3374-
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 {
3400+
fn send_update_fee<F: Deref, L: Deref>(
3401+
&mut self, feerate_per_kw: u32, mut force_holding_cell: bool,
3402+
fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
3403+
) -> Option<msgs::UpdateFee>
3404+
where F::Target: FeeEstimator, L::Target: Logger
3405+
{
33753406
if !self.context.is_outbound() {
33763407
panic!("Cannot send fee from inbound channel");
33773408
}
@@ -3398,11 +3429,12 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
33983429
// Note, we evaluate pending htlc "preemptive" trimmed-to-dust threshold at the proposed `feerate_per_kw`.
33993430
let holder_tx_dust_exposure = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat;
34003431
let counterparty_tx_dust_exposure = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat;
3401-
if holder_tx_dust_exposure > self.context.get_max_dust_htlc_exposure_msat() {
3432+
let max_dust_htlc_exposure_msat = self.context.get_max_dust_htlc_exposure_msat(fee_estimator);
3433+
if holder_tx_dust_exposure > max_dust_htlc_exposure_msat {
34023434
log_debug!(logger, "Cannot afford to send new feerate at {} without infringing max dust htlc exposure", feerate_per_kw);
34033435
return None;
34043436
}
3405-
if counterparty_tx_dust_exposure > self.context.get_max_dust_htlc_exposure_msat() {
3437+
if counterparty_tx_dust_exposure > max_dust_htlc_exposure_msat {
34063438
log_debug!(logger, "Cannot afford to send new feerate at {} without infringing max dust htlc exposure", feerate_per_kw);
34073439
return None;
34083440
}
@@ -3633,11 +3665,12 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
36333665
let outbound_stats = self.context.get_outbound_pending_htlc_stats(None);
36343666
let holder_tx_dust_exposure = inbound_stats.on_holder_tx_dust_exposure_msat + outbound_stats.on_holder_tx_dust_exposure_msat;
36353667
let counterparty_tx_dust_exposure = inbound_stats.on_counterparty_tx_dust_exposure_msat + outbound_stats.on_counterparty_tx_dust_exposure_msat;
3636-
if holder_tx_dust_exposure > self.context.get_max_dust_htlc_exposure_msat() {
3668+
let max_dust_htlc_exposure_msat = self.context.get_max_dust_htlc_exposure_msat(fee_estimator);
3669+
if holder_tx_dust_exposure > max_dust_htlc_exposure_msat {
36373670
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)",
36383671
msg.feerate_per_kw, holder_tx_dust_exposure)));
36393672
}
3640-
if counterparty_tx_dust_exposure > self.context.get_max_dust_htlc_exposure_msat() {
3673+
if counterparty_tx_dust_exposure > max_dust_htlc_exposure_msat {
36413674
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)",
36423675
msg.feerate_per_kw, counterparty_tx_dust_exposure)));
36433676
}
@@ -4991,13 +5024,16 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
49915024
/// commitment update.
49925025
///
49935026
/// `Err`s will only be [`ChannelError::Ignore`].
4994-
pub fn queue_add_htlc<L: Deref>(
5027+
pub fn queue_add_htlc<F: Deref, L: Deref>(
49955028
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
4996-
onion_routing_packet: msgs::OnionPacket, skimmed_fee_msat: Option<u64>, logger: &L
4997-
) -> Result<(), ChannelError> where L::Target: Logger {
5029+
onion_routing_packet: msgs::OnionPacket, skimmed_fee_msat: Option<u64>,
5030+
fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5031+
) -> Result<(), ChannelError>
5032+
where F::Target: FeeEstimator, L::Target: Logger
5033+
{
49985034
self
49995035
.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, true,
5000-
skimmed_fee_msat, logger)
5036+
skimmed_fee_msat, fee_estimator, logger)
50015037
.map(|msg_opt| assert!(msg_opt.is_none(), "We forced holding cell?"))
50025038
.map_err(|err| {
50035039
if let ChannelError::Ignore(_) = err { /* fine */ }
@@ -5022,11 +5058,13 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
50225058
/// on this [`Channel`] if `force_holding_cell` is false.
50235059
///
50245060
/// `Err`s will only be [`ChannelError::Ignore`].
5025-
fn send_htlc<L: Deref>(
5061+
fn send_htlc<F: Deref, L: Deref>(
50265062
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
50275063
onion_routing_packet: msgs::OnionPacket, mut force_holding_cell: bool,
5028-
skimmed_fee_msat: Option<u64>, logger: &L
5029-
) -> Result<Option<msgs::UpdateAddHTLC>, ChannelError> where L::Target: Logger {
5064+
skimmed_fee_msat: Option<u64>, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5065+
) -> Result<Option<msgs::UpdateAddHTLC>, ChannelError>
5066+
where F::Target: FeeEstimator, L::Target: Logger
5067+
{
50305068
if (self.context.channel_state & (ChannelState::ChannelReady as u32 | BOTH_SIDES_SHUTDOWN_MASK)) != (ChannelState::ChannelReady as u32) {
50315069
return Err(ChannelError::Ignore("Cannot send HTLC until channel is fully established and we haven't started shutting down".to_owned()));
50325070
}
@@ -5039,7 +5077,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
50395077
return Err(ChannelError::Ignore("Cannot send 0-msat HTLC".to_owned()));
50405078
}
50415079

5042-
let available_balances = self.context.get_available_balances();
5080+
let available_balances = self.context.get_available_balances(fee_estimator);
50435081
if amount_msat < available_balances.next_outbound_htlc_minimum_msat {
50445082
return Err(ChannelError::Ignore(format!("Cannot send less than our next-HTLC minimum - {} msat",
50455083
available_balances.next_outbound_htlc_minimum_msat)));
@@ -5239,12 +5277,15 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
52395277
///
52405278
/// Shorthand for calling [`Self::send_htlc`] followed by a commitment update, see docs on
52415279
/// [`Self::send_htlc`] and [`Self::build_commitment_no_state_update`] for more info.
5242-
pub fn send_htlc_and_commit<L: Deref>(
5243-
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
5244-
onion_routing_packet: msgs::OnionPacket, skimmed_fee_msat: Option<u64>, logger: &L
5245-
) -> Result<Option<ChannelMonitorUpdate>, ChannelError> where L::Target: Logger {
5280+
pub fn send_htlc_and_commit<F: Deref, L: Deref>(
5281+
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32,
5282+
source: HTLCSource, onion_routing_packet: msgs::OnionPacket, skimmed_fee_msat: Option<u64>,
5283+
fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5284+
) -> Result<Option<ChannelMonitorUpdate>, ChannelError>
5285+
where F::Target: FeeEstimator, L::Target: Logger
5286+
{
52465287
let send_res = self.send_htlc(amount_msat, payment_hash, cltv_expiry, source,
5247-
onion_routing_packet, false, skimmed_fee_msat, logger);
5288+
onion_routing_packet, false, skimmed_fee_msat, fee_estimator, logger);
52485289
if let Err(e) = &send_res { if let ChannelError::Ignore(_) = e {} else { debug_assert!(false, "Sending cannot trigger channel failure"); } }
52495290
match send_res? {
52505291
Some(_) => {

0 commit comments

Comments
 (0)