htlcswitch: add NextBlinding to ForwardingInfo and set in UpdateAddHtlc
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.
This commit is contained in:
4 files changed
+52
-6
No files matched your search
+8
-6
@@ -3348,9 +3348,10 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg,
|
||||
// Otherwise, it was already processed, we can
|
||||
// can collect it and continue.
|
||||
addMsg := &lnwire.UpdateAddHTLC{
|
||||
Expiry: fwdInfo.OutgoingCTLV,
|
||||
Amount: fwdInfo.AmountToForward,
|
||||
PaymentHash: pd.RHash,
|
||||
Expiry: fwdInfo.OutgoingCTLV,
|
||||
Amount: fwdInfo.AmountToForward,
|
||||
PaymentHash: pd.RHash,
|
||||
BlindingPoint: fwdInfo.NextBlinding,
|
||||
}
|
||||
|
||||
// Finally, we'll encode the onion packet for
|
||||
@@ -3393,9 +3394,10 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg,
|
||||
// create the outgoing HTLC using the parameters as
|
||||
// specified in the forwarding info.
|
||||
addMsg := &lnwire.UpdateAddHTLC{
|
||||
Expiry: fwdInfo.OutgoingCTLV,
|
||||
Amount: fwdInfo.AmountToForward,
|
||||
PaymentHash: pd.RHash,
|
||||
Expiry: fwdInfo.OutgoingCTLV,
|
||||
Amount: fwdInfo.AmountToForward,
|
||||
PaymentHash: pd.RHash,
|
||||
BlindingPoint: fwdInfo.NextBlinding,
|
||||
}
|
||||
|
||||
// Finally, we'll encode the onion packet for the
|
||||
|
||||
Reference in new issue
Block a user