mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 22:22:36 +02:00
lnwire: update Sig to support both ECDSA and schnorr sigs
In this commit, we update the Sig type to support ECDSA and schnorr signatures. We need to do this as the HTLC signatures will become schnorr sigs for taproot channels. The current spec draft opts to overload this field since both the sigs are actually 64 bytes in length. The only consideration with this move is that callers need to "coerce" a sig to the proper type if they need schnorr signatures.
This commit is contained in:
@ -618,8 +618,9 @@ func testBackupTask(t *testing.T, test backupTaskTest) {
|
||||
// moment, it is tested indirectly by other packages and integration
|
||||
// tests.
|
||||
// TODO(conner): include signature validation checks
|
||||
|
||||
emptyToLocalSig := bytes.Equal(jKit.CommitToLocalSig[:], zeroSig[:])
|
||||
emptyToLocalSig := bytes.Equal(
|
||||
jKit.CommitToLocalSig.RawBytes(), zeroSig[:],
|
||||
)
|
||||
if hasToLocal {
|
||||
require.False(t, emptyToLocalSig, "to-local signature should "+
|
||||
"not be empty")
|
||||
@ -628,7 +629,9 @@ func testBackupTask(t *testing.T, test backupTaskTest) {
|
||||
"be empty")
|
||||
}
|
||||
|
||||
emptyToRemoteSig := bytes.Equal(jKit.CommitToRemoteSig[:], zeroSig[:])
|
||||
emptyToRemoteSig := bytes.Equal(
|
||||
jKit.CommitToRemoteSig.RawBytes(), zeroSig[:],
|
||||
)
|
||||
if hasToRemote {
|
||||
require.False(t, emptyToRemoteSig, "to-remote signature "+
|
||||
"should not be empty")
|
||||
|
Reference in New Issue
Block a user