mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-21 14:10:35 +02:00
htlcswitch: expose additional fields for intercepted packets
This commit is contained in:
@@ -121,9 +121,12 @@ func (f *interceptedForward) Packet() InterceptedPacket {
|
||||
ChanID: f.packet.incomingChanID,
|
||||
HtlcID: f.packet.incomingHTLCID,
|
||||
},
|
||||
OutgoingChanID: f.packet.outgoingChanID,
|
||||
Hash: f.htlc.PaymentHash,
|
||||
OutgoingExpiry: f.htlc.Expiry,
|
||||
OutgoingAmount: f.htlc.Amount,
|
||||
IncomingAmount: f.packet.incomingAmount,
|
||||
IncomingExpiry: f.packet.incomingTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -207,6 +207,9 @@ type InterceptedPacket struct {
|
||||
// packet.
|
||||
IncomingCircuit channeldb.CircuitKey
|
||||
|
||||
// OutgoingChanID is the destination channel for this packet.
|
||||
OutgoingChanID lnwire.ShortChannelID
|
||||
|
||||
// Hash is the payment hash of the htlc.
|
||||
Hash lntypes.Hash
|
||||
|
||||
@@ -216,6 +219,13 @@ type InterceptedPacket struct {
|
||||
|
||||
// OutgoingAmount is the amount to forward.
|
||||
OutgoingAmount lnwire.MilliSatoshi
|
||||
|
||||
// IncomingExpiry is the absolute block height at which the incoming
|
||||
// htlc expires.
|
||||
IncomingExpiry uint32
|
||||
|
||||
// IncomingAmount is the amount of the accepted htlc.
|
||||
IncomingAmount lnwire.MilliSatoshi
|
||||
}
|
||||
|
||||
// InterceptedForward is passed to the ForwardInterceptor for every forwarded
|
||||
|
Reference in New Issue
Block a user