Merge pull request #2333 from filecoin-project/asr/temp

Correct initial setup of sector id counter
This commit is contained in:
Łukasz Magiera 2020-07-09 21:40:30 +02:00 committed by GitHub
commit 2836b521f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,10 +359,8 @@ func migratePreSealMeta(ctx context.Context, api lapi.FullNode, metadata string,
}*/ }*/
} }
log.Infof("Setting next sector ID to %d", maxSectorID+1)
buf := make([]byte, binary.MaxVarintLen64) buf := make([]byte, binary.MaxVarintLen64)
size := binary.PutUvarint(buf, uint64(maxSectorID+1)) size := binary.PutUvarint(buf, uint64(maxSectorID))
return mds.Put(datastore.NewKey(modules.StorageCounterDSPrefix), buf[:size]) return mds.Put(datastore.NewKey(modules.StorageCounterDSPrefix), buf[:size])
} }