mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-28 13:52:55 +02:00
htlcswitch: remove synchronous link handoff, special-case keystone err
This allows Switch-initiated payments to be failed back if they don't make it into a commitment. Prior to this commit, a Switch-initiated HTLC could get "lost" meaning the circuit wouldn't get deleted except if conditions were "right" and the network result store would never be made aware of the HTLC's fate. Switch-initiated HTLC's are now passed to the link's mailbox to ensure they can be failed back. This change also special-cases the ErrDuplicateKeystone error from OpenCircuits(...) so that callers of updateCommitTx() in the link don't send an Error to the peer if they encounter the keystone error. With the first async change, the keystone error should now always be recoverable.
This commit is contained in:
@@ -52,10 +52,6 @@ type packetHandler interface {
|
||||
//
|
||||
// NOTE: This function should block as little as possible.
|
||||
handleSwitchPacket(*htlcPacket) error
|
||||
|
||||
// handleLocalAddPacket handles a locally-initiated UpdateAddHTLC
|
||||
// packet. It will be processed synchronously.
|
||||
handleLocalAddPacket(*htlcPacket) error
|
||||
}
|
||||
|
||||
// dustHandler is an interface used exclusively by the Switch to evaluate
|
||||
|
Reference in New Issue
Block a user