signer: fix crash when musig combine doesn't have final sig

This commit is contained in:
Andras Banki-Horvath committed 2022-05-06 12:29:38 +02:00
1 parent ddf0571031
commit c4c188f6d9
1 file changed
+8 -3
+8 -3
View File
@@ -938,10 +938,15 @@ func (s *Server) MuSig2CombineSig(_ context.Context,
return nil, fmt.Errorf("error combining signatures: %v", err)
}
return &MuSig2CombineSigResponse{
resp := &MuSig2CombineSigResponse{
HaveAllSignatures: haveAllSigs,
FinalSignature: finalSig.Serialize(),
}, nil
}
if haveAllSigs {
resp.FinalSignature = finalSig.Serialize()
}
return resp, err
}
// MuSig2Cleanup removes a session from memory to free up resources.