sync: Correctly pass blocks to ValidateBlock

This commit is contained in:
Łukasz Magiera 2020-06-23 13:21:01 +02:00
parent b71f771acb
commit 9e70e95242

View File

@ -468,6 +468,8 @@ func (syncer *Syncer) ValidateTipSet(ctx context.Context, fts *store.FullTipSet)
var futures []async.ErrorFuture
for _, b := range fts.Blocks {
b := b // rebind to a scoped variable
futures = append(futures, async.Err(func() error {
if err := syncer.ValidateBlock(ctx, b); err != nil {
if isPermanent(err) {