mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
htlcswitch: encapsulate exposed packet info
This commit is contained in:
@@ -115,15 +115,15 @@ type interceptedForward struct {
|
||||
}
|
||||
|
||||
// Packet returns the intercepted htlc packet.
|
||||
func (f *interceptedForward) Packet() lnwire.UpdateAddHTLC {
|
||||
return *f.htlc
|
||||
}
|
||||
|
||||
// CircuitKey returns the circuit key for the intercepted htlc.
|
||||
func (f *interceptedForward) CircuitKey() channeldb.CircuitKey {
|
||||
return channeldb.CircuitKey{
|
||||
ChanID: f.packet.incomingChanID,
|
||||
HtlcID: f.packet.incomingHTLCID,
|
||||
func (f *interceptedForward) Packet() InterceptedPacket {
|
||||
return InterceptedPacket{
|
||||
IncomingCircuit: channeldb.CircuitKey{
|
||||
ChanID: f.packet.incomingChanID,
|
||||
HtlcID: f.packet.incomingHTLCID,
|
||||
},
|
||||
Hash: f.htlc.PaymentHash,
|
||||
OutgoingExpiry: f.htlc.Expiry,
|
||||
OutgoingAmount: f.htlc.Amount,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user