fix: sync: iterate over returned messages directly (#11373)

This commit is contained in:
Aayush Rajasekaran 2023-11-01 18:08:23 -04:00 committed by GitHub
parent 5f593b3ae1
commit 29fbfaf13d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1094,8 +1094,8 @@ func (syncer *Syncer) fetchMessages(ctx context.Context, headers []*types.TipSet
requestErr = multierror.Append(requestErr, err)
} else {
isGood := true
for index, ts := range headers[nextI:lastI] {
cm := result[index]
for index, cm := range result {
ts := headers[nextI+index]
if err := checkMsgMeta(ts, cm.Bls, cm.Secpk, cm.BlsIncludes, cm.SecpkIncludes); err != nil {
log.Errorf("fetched messages not as expected: %s", err)
isGood = false