mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-29 03:01:52 +01:00
lnwallet: return structured error from VerifyCommitSig
This commit is contained in:
parent
3879138018
commit
83f1bd4717
@ -467,8 +467,17 @@ func (m *MusigSession) VerifyCommitSig(commitTx *wire.MsgTx,
|
||||
walletLog.Infof("Verifying new musig2 sig for session=%x, nonce=%s",
|
||||
m.session.SessionID[:], m.nonces.String())
|
||||
|
||||
if partialSig == nil {
|
||||
return nil, fmt.Errorf("partial sig not set")
|
||||
}
|
||||
|
||||
if !partialSig.Verify(sigHash, m.remoteKey.PubKey) {
|
||||
return nil, fmt.Errorf("invalid partial commit sig")
|
||||
return nil, &invalidPartialSigError{
|
||||
partialSig: partialSig.Serialize(),
|
||||
sigHash: sigHash,
|
||||
verificationNonce: m.nonces.VerificationNonce.PubNonce,
|
||||
signingNonce: m.nonces.SigningNonce.PubNonce,
|
||||
}
|
||||
}
|
||||
|
||||
nonceOpts := []musig2.NonceGenOption{
|
||||
|
Loading…
x
Reference in New Issue
Block a user