lnd/htlcswitch
bitromortac 32373b76c7
htlcswitch+lnrpc: report node-ID next hop to the off-chain HTLC interceptor
When the switch forwards a blinded hop identified by node ID, it has not
yet resolved a concrete outgoing channel at interception time. Expose the
next hop to the interceptor: InterceptedForward.Packet() reports the
packet's outgoing channel as-is (hop.Exit, since none is selected yet) and
carries the requested pubkey in OutgoingNodeID.

At the RPC boundary, forwardInterceptor.onIntercept maps a node-ID hop to
the reserved NodeIDForwardSCID sentinel in outgoing_requested_chan_id and
the pubkey in outgoing_requested_node_id, so a client switching on a zero
channel ID to detect the exit hop does not misread the forward as a final
receive. The sentinel is a wire-only concern, applied where the request is
built rather than in the switch's internal InterceptedPacket, which stays
truthful (OutgoingNodeID.IsSome() is the node-ID discriminator).
2026-07-30 08:57:18 +00:00
..
hodl multi: add golang 1.17 compatible build tags 2021-09-29 17:31:37 -07:00
hop htlcswitch/hop: decode next_node_id blinded hops 2026-07-30 08:54:35 +00:00
testdata multi: update linter, fix new issues 2023-06-13 11:58:33 +02:00
circuit.go multi+refactor: move models package to graph/db 2024-11-28 13:34:33 +02:00
circuit_map.go chanstate: use channel types in switch config 2026-07-07 07:18:57 -03:00
circuit_map_test.go chanstate: use channel types in switch config 2026-07-07 07:18:57 -03:00
circuit_test.go multi: upgrade to btcd v2 modules 2026-06-24 10:58:36 -07:00
decayedlog.go htlcswitch: remove batchReplayBkt 2025-06-17 11:39:38 +08:00
decayedlog_test.go htlcswitch: use T.TempDir to create temporary test directory 2022-08-24 09:03:01 +08:00
failure.go htlcswitch: add linkError field to htlcpacket 2020-02-06 19:43:29 +02:00
failure_detail.go htlcswitch: add linkError field to htlcpacket 2020-02-06 19:43:29 +02:00
failure_test.go multi: update linter, fix new issues 2023-06-13 11:58:33 +02:00
held_htlc_set.go htlcswitch: track held HTLC source 2026-06-26 12:23:06 -03:00
held_htlc_set_test.go htlcswitch: track held HTLC source 2026-06-26 12:23:06 -03:00
htlcnotifier.go htlcswitch: classify a node-ID forward as a forward event 2026-07-30 08:57:18 +00:00
htlcnotifier_test.go htlcswitch: classify a node-ID forward as a forward event 2026-07-30 08:57:18 +00:00
interceptable_switch.go htlcswitch+lnrpc: report node-ID next hop to the off-chain HTLC interceptor 2026-07-30 08:57:18 +00:00
interfaces.go htlcswitch+lnrpc: report node-ID next hop to the off-chain HTLC interceptor 2026-07-30 08:57:18 +00:00
link.go htlcswitch: forward node-ID blinded hops via non-strict forwarding 2026-07-30 08:57:18 +00:00
link_isolated_test.go htlcswitch+invoices: align final-hop CLTV handling 2026-06-25 16:28:55 -03:00
link_test.go multi: represent the blinded forwarding next hop as an fn.Either 2026-07-29 14:02:00 +00:00
linkfailure.go multi: use the "errors" package everywhere 2025-06-30 09:46:55 +02:00
log.go multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00
mailbox.go htlcswitch: forward node-ID blinded hops via non-strict forwarding 2026-07-30 08:57:18 +00:00
mailbox_test.go htlcswitch: forward node-ID blinded hops via non-strict forwarding 2026-07-30 08:57:18 +00:00
mock.go multi: represent the blinded forwarding next hop as an fn.Either 2026-07-29 14:02:00 +00:00
packet.go htlcswitch: forward node-ID blinded hops via non-strict forwarding 2026-07-30 08:57:18 +00:00
payment_result.go htlcswitch: rename paymentID to attemptID for clarity 2024-08-07 22:17:58 +08:00
payment_result_test.go multi: rename chan DB Open method to OpenForTesting 2024-11-28 13:51:15 +02:00
quiescer.go multi: add new config QuiescenceTimeout 2025-07-04 04:19:59 +08:00
quiescer_test.go multi: update to fn v2 2024-12-04 13:19:00 -07:00
resolution_store.go multi: use the "errors" package everywhere 2025-06-30 09:46:55 +02:00
resolution_store_test.go multi: update walletdb package 2025-04-09 18:47:53 +02:00
sequencer.go multi: use the "errors" package everywhere 2025-06-30 09:46:55 +02:00
switch.go htlcswitch: classify a node-ID forward as a forward event 2026-07-30 08:57:18 +00:00
switch_test.go htlcswitch: forward node-ID blinded hops via non-strict forwarding 2026-07-30 08:57:18 +00:00
test_utils.go htlcswitch: use channel state open channel 2026-07-07 07:18:59 -03:00