Skip to content

Commit 51a035b

Browse files
committed
Move HTLC interception decisions to forward_htlcs callsites
In the next commit we'll substantially expand the types of HTLCs which can be intercepted. In order to do so, we want to make forwarding decisions with access to the (specified) destination channel. Sadly, this isn't available in `forward_htlcs`, so here we move interception decisions out of `forward_htlcs` and into `process_pending_update_add_htlcs` and `handle_release_held_htlc`. Note that we do not handle HTLC interception when forwarding an HTLC which was decoded in LDK versions prior to 0.2, which is noted in a suggested release note. This is due to a gap where such HTLC might have had its routing decision made already and be waiting for an interception decision in `forward_htlcs`, but now we will only make an interception decision when decoding the onion.
1 parent b2cc5bb commit 51a035b

3 files changed

Lines changed: 208 additions & 161 deletions

File tree

0 commit comments

Comments
 (0)