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:
Olaoluwa Osuntokun committed 2023-08-22 16:29:19 -07:00
1 parent eccc77315b
commit b368e476c5
29 files changed
+296 -128

No files matched your search

+1 -2
View File
@@ -5,7 +5,6 @@ import (
"sync"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/ecdsa"
"github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/lnwire"
@@ -36,7 +35,7 @@ type VerifyJob struct {
// Sig is the raw signature generated using the above public key. This
// is the signature to be verified.
Sig *ecdsa.Signature
Sig input.Signature
// SigHash is a function closure generates the sighashes that the
// passed signature is known to have signed.