mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-05 20:52:59 +02:00
htlcswitch: add blinding point to decode hop iterator request
This commit is contained in:
@@ -178,6 +178,7 @@ type DecodeHopIteratorRequest struct {
|
||||
OnionReader io.Reader
|
||||
RHash []byte
|
||||
IncomingCltv uint32
|
||||
BlindingPoint *btcec.PublicKey
|
||||
}
|
||||
|
||||
// DecodeHopIteratorResponse encapsulates the outcome of a batched sphinx onion
|
||||
@@ -233,8 +234,15 @@ func (p *OnionProcessor) DecodeHopIterators(id []byte,
|
||||
return lnwire.CodeInvalidOnionKey
|
||||
}
|
||||
|
||||
var opts []sphinx.ProcessOnionOpt
|
||||
if req.BlindingPoint != nil {
|
||||
opts = append(opts, sphinx.WithBlindingPoint(
|
||||
req.BlindingPoint,
|
||||
))
|
||||
}
|
||||
|
||||
err = tx.ProcessOnionPacket(
|
||||
seqNum, onionPkt, req.RHash, req.IncomingCltv,
|
||||
seqNum, onionPkt, req.RHash, req.IncomingCltv, opts...,
|
||||
)
|
||||
switch err {
|
||||
case nil:
|
||||
|
@@ -3163,6 +3163,7 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg,
|
||||
OnionReader: onionReader,
|
||||
RHash: pd.RHash[:],
|
||||
IncomingCltv: pd.Timeout,
|
||||
BlindingPoint: pd.BlindingPoint,
|
||||
}
|
||||
|
||||
decodeReqs = append(decodeReqs, req)
|
||||
|
Reference in New Issue
Block a user