mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
htlcswitch: Change circuit map keys to (channel ID, HTLC ID).
This changes the circuit map internals and API to reference circuits by a primary key of (channel ID, HTLC ID) instead of paymnet hash. This is because each circuit has a unique offered HTLC, but there may be multiple circuits for a payment hash with different source or destination channels.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
bc8d674958
commit
1328e61c00
@@ -27,6 +27,14 @@ type htlcPacket struct {
|
||||
// of the target link.
|
||||
src lnwire.ShortChannelID
|
||||
|
||||
// destID is the ID of the HTLC in the destination channel. This will be set
|
||||
// when forwarding a settle or fail update back to the original source.
|
||||
destID uint64
|
||||
|
||||
// srcID is the ID of the HTLC in the source channel. This will be set when
|
||||
// forwarding any HTLC update message.
|
||||
srcID uint64
|
||||
|
||||
// amount is the value of the HTLC that is being created or modified.
|
||||
amount lnwire.MilliSatoshi
|
||||
|
||||
|
Reference in New Issue
Block a user