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