Commit Graph

5 Commits

Author SHA1 Message Date
Johan T. Halseth
a6d2263569
htlcswitch: add PermanentFailure to LinkFailureError 2020-11-04 10:50:28 +01:00
Conner Fromknecht
ec1b8d874d
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.
2020-04-14 10:51:30 -07:00
Conner Fromknecht
a8977651cc
htlcswitch/linkfailure: use whitelist for ShouldSendToPeer 2020-04-14 10:51:06 -07:00
Olaoluwa Osuntokun
4b65aea306
watchtower+htlcswitch: update client tower logic to recognize safu commitments
In this commit, we update the tower+link logic to tag a commitment as
the new (tweakless) format if it applies. In order to do this, the
BackupTask method has gained an additional parameter to indicate the
type of commitment that we're attempting to upload. This new tweakless
bool is then threaded through all the way to back up task creation to
ensure that we make the proper input.Input.

Finally, we've added a new test case for each existing test case to test
each case w/ and w/o the tweakless modifier.
2019-09-25 18:25:55 -07:00
Johan T. Halseth
92afcbe3f4
htlcswitch/linkfailure: define LinkFailureError
This commit introduces a new error type LinkFailureError which is used
to distinguish the different kinds of errors that we can encounter
during link operation. It encapsulates the information necessary to
decide how we should handle the error.
2018-05-25 06:58:18 +02:00