From 638516879f371a630c7d9f6849e39750e629fb7c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 25 Jul 2023 17:10:53 -0700 Subject: [PATCH] lnwallet: add extra sanity check in VerifyCommitSig --- lnwallet/musig_session.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lnwallet/musig_session.go b/lnwallet/musig_session.go index 89cc36a96..f850f8cf6 100644 --- a/lnwallet/musig_session.go +++ b/lnwallet/musig_session.go @@ -436,6 +436,10 @@ func (m *MusigSession) VerifyCommitSig(commitTx *wire.MsgTx, optFunc(opts) } + if sig == nil { + return nil, fmt.Errorf("sig not provided") + } + // Before we can verify the signature, we'll need to finalize the // session by binding the remote party's provided signing nonce. if err := m.FinalizeSession(musig2.Nonces{