Skip to content

Commit dabb898

Browse files
committed
f mark claim_htlc_while_disconnected_dropping_mon_update legacy
1 parent a308039 commit dabb898

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lightning/src/ln/channel.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -3877,12 +3877,14 @@ impl<SP: Deref> Channel<SP> where
38773877
/// Claims an HTLC while we're disconnected from a peer, dropping the [`ChannelMonitorUpdate`]
38783878
/// entirely.
38793879
///
3880+
/// This is only used for payments received prior to LDK 0.1.
3881+
///
38803882
/// The [`ChannelMonitor`] for this channel MUST be updated out-of-band with the preimage
38813883
/// provided (i.e. without calling [`crate::chain::Watch::update_channel`]).
38823884
///
38833885
/// The HTLC claim will end up in the holding cell (because the caller must ensure the peer is
38843886
/// disconnected).
3885-
pub fn claim_htlc_while_disconnected_dropping_mon_update<L: Deref>
3887+
pub fn claim_htlc_while_disconnected_dropping_mon_update_legacy<L: Deref>
38863888
(&mut self, htlc_id_arg: u64, payment_preimage_arg: PaymentPreimage, logger: &L)
38873889
where L::Target: Logger {
38883890
// Assert that we'll add the HTLC claim to the holding cell in `get_update_fulfill_htlc`

lightning/src/ln/channelmanager.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -13268,7 +13268,9 @@ where
1326813268
let peer_state = &mut *peer_state_lock;
1326913269
if let Some(ChannelPhase::Funded(channel)) = peer_state.channel_by_id.get_mut(&previous_channel_id) {
1327013270
let logger = WithChannelContext::from(&channel_manager.logger, &channel.context, Some(payment_hash));
13271-
channel.claim_htlc_while_disconnected_dropping_mon_update(claimable_htlc.prev_hop.htlc_id, payment_preimage, &&logger);
13271+
channel.claim_htlc_while_disconnected_dropping_mon_update_legacy(
13272+
claimable_htlc.prev_hop.htlc_id, payment_preimage, &&logger
13273+
);
1327213274
}
1327313275
}
1327413276
if let Some(previous_hop_monitor) = args.channel_monitors.get(&claimable_htlc.prev_hop.outpoint) {

0 commit comments

Comments
 (0)