receipt repair migration - check for r storage mode (#2301)

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
This commit is contained in:
ledgerwatch 2021-07-05 08:53:46 +01:00 committed by GitHub
parent 7cca5abfea
commit afadde628c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,10 @@ var receiptRepair = Migration{
log.Warn("Could not perform this migration because history is not in storage mode")
return CommitProgress(db, nil, true)
}
if !sm.Receipts {
log.Info("Migration is only relevant for storage mode with receipts, skipping")
return CommitProgress(db, nil, true)
}
}
genesisBlock, err := rawdb.ReadBlockByNumber(tx, 0)