@@ -2226,8 +2226,9 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
2226
2226
None => { // unknown_next_peer
2227
2227
// Note that this is likely a timing oracle for detecting whether an scid is a
2228
2228
// phantom or an intercept.
2229
- if fake_scid:: is_valid_phantom ( & self . fake_scid_rand_bytes , * short_channel_id, & self . genesis_hash ) ||
2230
- fake_scid:: is_valid_intercept ( & self . fake_scid_rand_bytes , * short_channel_id, & self . genesis_hash )
2229
+ if ( self . default_configuration . accept_intercept_htlcs &&
2230
+ fake_scid:: is_valid_intercept ( & self . fake_scid_rand_bytes , * short_channel_id, & self . genesis_hash ) ) ||
2231
+ fake_scid:: is_valid_phantom ( & self . fake_scid_rand_bytes , * short_channel_id, & self . genesis_hash )
2231
2232
{
2232
2233
None
2233
2234
} else {
@@ -3050,14 +3051,16 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
3050
3051
/// Intercepted HTLCs can be useful for Lightning Service Providers (LSPs) to open a just-in-time
3051
3052
/// channel to a receiving node if the node lacks sufficient inbound liquidity.
3052
3053
///
3053
- /// To make use of intercepted HTLCs, use [`ChannelManager::get_intercept_scid`] to generate short
3054
- /// channel id(s) to put in the receiver's invoice route hints. These route hints will signal to
3055
- /// LDK to generate an [`HTLCIntercepted`] event when it receives the forwarded HTLC, and this
3056
- /// method or [`ChannelManager::fail_intercepted_htlc`] MUST be called in response to the event.
3054
+ /// To make use of intercepted HTLCs, set [`UserConfig::accept_intercept_htlcs`] and use
3055
+ /// [`ChannelManager::get_intercept_scid`] to generate short channel id(s) to put in the
3056
+ /// receiver's invoice route hints. These route hints will signal to LDK to generate an
3057
+ /// [`HTLCIntercepted`] event when it receives the forwarded HTLC, and this method or
3058
+ /// [`ChannelManager::fail_intercepted_htlc`] MUST be called in response to the event.
3057
3059
///
3058
3060
/// Note that LDK does not enforce fee requirements in `amt_to_forward_msat`, and will not stop
3059
3061
/// you from forwarding more than you received.
3060
3062
///
3063
+ /// [`UserConfig::accept_intercept_htlcs`]: crate::util::config::UserConfig::accept_intercept_htlcs
3061
3064
/// [`HTLCIntercepted`]: events::Event::HTLCIntercepted
3062
3065
// TODO: when we move to deciding the best outbound channel at forward time, only take
3063
3066
// `next_node_id` and not `next_hop_channel_id`
0 commit comments