Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit d49f338

Browse files
committed
fix: only count migrated blocks
1 parent 3c31f7b commit d49f338

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

migrations/migration-8/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ async function process (repoPath, repoOptions, onProgress, keyFunction) {
5454

5555
for await (const block of blockstore.query({})) {
5656
const newKey = keyFunction(block.key)
57-
counter += 1
5857

5958
// If the Key is base32 CIDv0 then there's nothing to do
6059
if(newKey.toString() !== block.key.toString()) {
60+
counter += 1
6161
log(`Migrating Block from ${block.key} to ${newKey}`)
6262
await blockstore.delete(block.key)
6363
await blockstore.put(newKey, block.value)

0 commit comments

Comments
 (0)