htlcswitch/link: add pending commit ticker for stall detection
This commit adds a PendingCommitTicker to the link config, which allows us to control how quickly we fail the link if the commitment dance stalls. Now that the mailbox has the ability to cancel packets, when the link fails it will reset the mailbox packets on exit, forcing a reevaluation of the HTLCs against their mailbox expiries.
This commit is contained in:
5 files changed
+117
-8
No files matched your search
@@ -20,6 +20,10 @@ const (
|
||||
// to fail the link.
|
||||
ErrRemoteError
|
||||
|
||||
// ErrRemoteUnresponsive indicates that our peer took too long to
|
||||
// complete a commitment dance.
|
||||
ErrRemoteUnresponsive
|
||||
|
||||
// ErrSyncError indicates that we failed synchronizing the state of the
|
||||
// channel with our peer.
|
||||
ErrSyncError
|
||||
@@ -71,6 +75,8 @@ func (e LinkFailureError) Error() string {
|
||||
return "internal error"
|
||||
case ErrRemoteError:
|
||||
return "remote error"
|
||||
case ErrRemoteUnresponsive:
|
||||
return "remote unresponsive"
|
||||
case ErrSyncError:
|
||||
return "sync error"
|
||||
case ErrInvalidUpdate:
|
||||
|
||||
Reference in new issue
Block a user