mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
da76d05fa5
When we have a HTLC that is part of a blinded route, we need to include the next ephemeral blinding point in UpdateAddHtlc for the next hop. The way that we handle the addition of this key is the same for introduction nodes and relaying nodes within the route.
31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
package hop
|
|
|
|
import (
|
|
"github.com/lightningnetwork/lnd/lnwire"
|
|
)
|
|
|
|
// ForwardingInfo contains all the information that is necessary to forward and
|
|
// incoming HTLC to the next hop encoded within a valid HopIterator instance.
|
|
// Forwarding links are to use this information to authenticate the information
|
|
// received within the incoming HTLC, to ensure that the prior hop didn't
|
|
// tamper with the end-to-end routing information at all.
|
|
type ForwardingInfo struct {
|
|
// NextHop is the channel ID of the next hop. The received HTLC should
|
|
// be forwarded to this particular channel in order to continue the
|
|
// end-to-end route.
|
|
NextHop lnwire.ShortChannelID
|
|
|
|
// AmountToForward is the amount of milli-satoshis that the receiving
|
|
// node should forward to the next hop.
|
|
AmountToForward lnwire.MilliSatoshi
|
|
|
|
// OutgoingCTLV is the specified value of the CTLV timelock to be used
|
|
// in the outgoing HTLC.
|
|
OutgoingCTLV uint32
|
|
|
|
// NextBlinding is an optional blinding point to be passed to the next
|
|
// node in UpdateAddHtlc. This field is set if the htlc is part of a
|
|
// blinded route.
|
|
NextBlinding lnwire.BlindingPointRecord
|
|
}
|