Fix bls verification when there are no messages

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-07-22 21:59:05 +02:00
parent 78e7e59381
commit 8fb3f7e40e
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -1057,6 +1057,10 @@ func (syncer *Syncer) verifyBlsAggregate(ctx context.Context, sig *crypto.Signat
trace.Int64Attribute("msgCount", int64(len(msgs))),
)
if len(msgs) == 0 {
return nil
}
bmsgs := make([]bls.Message, len(msgs))
for i, m := range msgs {
bmsgs[i] = m.Bytes()