mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-09 23:53:02 +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:
@@ -702,6 +702,11 @@ func (f *mockChannelLink) HandleSwitchPacket(pkt *htlcPacket) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *mockChannelLink) HandleLocalAddPacket(pkt *htlcPacket) error {
|
||||
_ = f.mailBox.AddPacket(pkt)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *mockChannelLink) HandleChannelUpdate(lnwire.Message) {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user