Skip to content

Commit

Permalink
routerclient: expand InterceptHtlc func
Browse files Browse the repository at this point in the history
This commit expands the InterceptHtlc func by
adding the two remaining fields CustomRecords and
OnionBlob to the InterceptedHtlc struct
  • Loading branch information
sputn1ck committed Feb 14, 2024
1 parent f6c6471 commit 146b297
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions router_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ type InterceptedHtlc struct {
// Since lnd has non-strict forwarding, this may not be the channel that
// the htlc ends up being forwarded on.
OutgoingChannelID lnwire.ShortChannelID

// CustomRecords holds the custom TLV records that were added to the
// payment.
CustomRecords map[uint64][]byte

// OnionBlob is the onion blob for the next hop.
OnionBlob []byte
}

// HtlcInterceptHandler is a function signature for handling code for htlc
Expand Down Expand Up @@ -770,6 +777,8 @@ func (r *routerClient) InterceptHtlcs(ctx context.Context,
IncomingExpiryHeight: request.IncomingExpiry,
OutgoingExpiryHeight: request.OutgoingExpiry,
OutgoingChannelID: chanOut,
CustomRecords: request.CustomRecords,
OnionBlob: request.OnionBlob,
}

// Try to send our interception request, failing on
Expand Down

0 comments on commit 146b297

Please sign in to comment.