Skip to content

Commit 15854a4

Browse files
f update interception docs
1 parent 1b95a5c commit 15854a4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lightning/src/events/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ pub enum Event {
623623
inbound_amount_msat: u64,
624624
/// How many msats the payer intended to route to the next node. Depending on the reason you are
625625
/// intercepting this payment, you might take a fee by forwarding less than this amount.
626+
/// Forwarding less than this amount may break compatibility with LDK versions prior to 0.0.116.
626627
///
627628
/// Note that LDK will NOT check that expected fees were factored into this value. You MUST
628629
/// check that whatever fee you want has been included here or subtract it as required. Further,

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3485,13 +3485,16 @@ where
34853485
/// [`ChannelManager::fail_intercepted_htlc`] MUST be called in response to the event.
34863486
///
34873487
/// Note that LDK does not enforce fee requirements in `amt_to_forward_msat`, and will not stop
3488-
/// you from forwarding more than you received.
3488+
/// you from forwarding more than you received. See
3489+
/// [`HTLCIntercepted::expected_outbound_amount_msat`] for more on forwarding a different amount
3490+
/// than expected.
34893491
///
34903492
/// Errors if the event was not handled in time, in which case the HTLC was automatically failed
34913493
/// backwards.
34923494
///
34933495
/// [`UserConfig::accept_intercept_htlcs`]: crate::util::config::UserConfig::accept_intercept_htlcs
34943496
/// [`HTLCIntercepted`]: events::Event::HTLCIntercepted
3497+
/// [`HTLCIntercepted::expected_outbound_amount_msat`]: events::Event::HTLCIntercepted::expected_outbound_amount_msat
34953498
// TODO: when we move to deciding the best outbound channel at forward time, only take
34963499
// `next_node_id` and not `next_hop_channel_id`
34973500
pub fn forward_intercepted_htlc(&self, intercept_id: InterceptId, next_hop_channel_id: &[u8; 32], next_node_id: PublicKey, amt_to_forward_msat: u64) -> Result<(), APIError> {

0 commit comments

Comments
 (0)