diff --git a/htlcswitch/hop/iterator.go b/htlcswitch/hop/iterator.go index 1ae669e28..55ec6032f 100644 --- a/htlcswitch/hop/iterator.go +++ b/htlcswitch/hop/iterator.go @@ -175,9 +175,10 @@ func (p *OnionProcessor) ReconstructHopIterator(r io.Reader, rHash []byte) ( // packet, perform sphinx replay detection, and schedule the entry for garbage // collection. type DecodeHopIteratorRequest struct { - OnionReader io.Reader - RHash []byte - IncomingCltv uint32 + 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: diff --git a/htlcswitch/link.go b/htlcswitch/link.go index e80c7650c..2c6b0b5e4 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -3160,9 +3160,10 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg, onionReader := bytes.NewReader(pd.OnionBlob) req := hop.DecodeHopIteratorRequest{ - OnionReader: onionReader, - RHash: pd.RHash[:], - IncomingCltv: pd.Timeout, + OnionReader: onionReader, + RHash: pd.RHash[:], + IncomingCltv: pd.Timeout, + BlindingPoint: pd.BlindingPoint, } decodeReqs = append(decodeReqs, req)