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.
This commit is contained in:
8 files changed
+219
-162
No files matched your search
@@ -34,6 +34,11 @@ const (
|
||||
// ErrInvalidRevocation indicates that the remote peer send us an
|
||||
// invalid revocation message.
|
||||
ErrInvalidRevocation
|
||||
|
||||
// ErrRecoveryError the channel was unable to be resumed, we need the
|
||||
// remote party to force close the channel out on chain now as a
|
||||
// result.
|
||||
ErrRecoveryError
|
||||
)
|
||||
|
||||
// LinkFailureError encapsulates an error that will make us fail the current
|
||||
@@ -74,6 +79,8 @@ func (e LinkFailureError) Error() string {
|
||||
return "invalid commitment"
|
||||
case ErrInvalidRevocation:
|
||||
return "invalid revocation"
|
||||
case ErrRecoveryError:
|
||||
return "unable to resume channel, recovery required"
|
||||
default:
|
||||
return "unknown error"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user