mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-28 11:56:58 +02:00
htlcswitch: sync link hand-off
This commit extends the link with a new synchronous delivery point for local UpdateAddHTLC messages. The switch method SendHTLC is updated to use this delivery point and thereby becomes a synchronous call. For MPP payments, synchronous hand-off is important. Otherwise the next pathfinding round could start without the channel balance updated yet.
This commit is contained in:
@@ -70,6 +70,10 @@ type ChannelLink interface {
|
||||
// possible).
|
||||
HandleSwitchPacket(*htlcPacket) error
|
||||
|
||||
// HandleLocalAddPacket handles a locally-initiated UpdateAddHTLC
|
||||
// packet. It will be processed synchronously.
|
||||
HandleLocalAddPacket(*htlcPacket) error
|
||||
|
||||
// HandleChannelUpdate handles the htlc requests as settle/add/fail
|
||||
// which sent to us from remote peer we have a channel with.
|
||||
//
|
||||
|
Reference in New Issue
Block a user