mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-02 18:24:42 +02:00
htlcswitch: encapsulate exposed packet info
This commit is contained in:
@@ -148,18 +148,18 @@ func (r *forwardInterceptor) holdAndForwardToClient(
|
||||
forward htlcswitch.InterceptedForward) error {
|
||||
|
||||
htlc := forward.Packet()
|
||||
inKey := forward.CircuitKey()
|
||||
inKey := htlc.IncomingCircuit
|
||||
|
||||
// First hold the forward, then send to client.
|
||||
r.holdForwards[forward.CircuitKey()] = forward
|
||||
r.holdForwards[inKey] = forward
|
||||
interceptionRequest := &ForwardHtlcInterceptRequest{
|
||||
IncomingCircuitKey: &CircuitKey{
|
||||
ChanId: inKey.ChanID.ToUint64(),
|
||||
HtlcId: inKey.HtlcID,
|
||||
},
|
||||
PaymentHash: htlc.PaymentHash[:],
|
||||
OutgoingAmountMsat: uint64(htlc.Amount),
|
||||
OutgoingExpiry: htlc.Expiry,
|
||||
PaymentHash: htlc.Hash[:],
|
||||
OutgoingAmountMsat: uint64(htlc.OutgoingAmount),
|
||||
OutgoingExpiry: htlc.OutgoingExpiry,
|
||||
}
|
||||
|
||||
return r.stream.Send(interceptionRequest)
|
||||
|
Reference in New Issue
Block a user