htlcswitch: add incoming amount and to decode hop iterator request
When we have payments inside of a blinded route, we need to know the incoming amount to be able to back-calculate the amount that we need to forward using the forwarding parameters provided in the blinded route encrypted data. This commit adds the payment amount to our DecodeHopIteratorRequest so that it can be threaded down to payment forwarding information creation in later commits.
This commit is contained in:
2 files changed
+10
-8
No files matched your search
+5
-4
@@ -3160,10 +3160,11 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg,
|
||||
onionReader := bytes.NewReader(pd.OnionBlob)
|
||||
|
||||
req := hop.DecodeHopIteratorRequest{
|
||||
OnionReader: onionReader,
|
||||
RHash: pd.RHash[:],
|
||||
IncomingCltv: pd.Timeout,
|
||||
BlindingPoint: pd.BlindingPoint,
|
||||
OnionReader: onionReader,
|
||||
RHash: pd.RHash[:],
|
||||
IncomingCltv: pd.Timeout,
|
||||
IncomingAmount: pd.Amount,
|
||||
BlindingPoint: pd.BlindingPoint,
|
||||
}
|
||||
|
||||
decodeReqs = append(decodeReqs, req)
|
||||
|
||||
Reference in new issue
Block a user