From 57a1418ff87d8ddded0b163e96b4b74bb8280747 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Thu, 9 Jul 2020 01:05:27 -0400 Subject: [PATCH] Correct initial setup of sector id counter --- cmd/lotus-storage-miner/init.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 14972c69a..208c17d03 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -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) - size := binary.PutUvarint(buf, uint64(maxSectorID+1)) + size := binary.PutUvarint(buf, uint64(maxSectorID)) return mds.Put(datastore.NewKey(modules.StorageCounterDSPrefix), buf[:size]) }