mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-12 14:42:38 +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:
@@ -785,16 +785,18 @@ func (c *ChanCloser) proposeCloseSigned(fee btcutil.Amount) (*lnwire.ClosingSign
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// We'll note our last signature and proposed fee so when the remote party
|
||||
// responds we'll be able to decide if we've agreed on fees or not.
|
||||
// We'll note our last signature and proposed fee so when the remote
|
||||
// party responds we'll be able to decide if we've agreed on fees or
|
||||
// not.
|
||||
c.lastFeeProposal = fee
|
||||
|
||||
parsedSig, err := lnwire.NewSigFromSignature(rawSig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
chancloserLog.Infof("ChannelPoint(%v): proposing fee of %v sat to close "+
|
||||
"chan", c.chanPoint, int64(fee))
|
||||
chancloserLog.Infof("ChannelPoint(%v): proposing fee of %v sat to "+
|
||||
"close chan", c.chanPoint, int64(fee))
|
||||
|
||||
// We'll assemble a ClosingSigned message using this information and return
|
||||
// it to the caller so we can kick off the final stage of the channel
|
||||
|
Reference in New Issue
Block a user