From afadde628cc2e7d987ce1c85a02999d060fe12f5 Mon Sep 17 00:00:00 2001 From: ledgerwatch Date: Mon, 5 Jul 2021 08:53:46 +0100 Subject: [PATCH] receipt repair migration - check for r storage mode (#2301) Co-authored-by: Alex Sharp --- migrations/receipt_repair.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/migrations/receipt_repair.go b/migrations/receipt_repair.go index eea42aaf2..63f33aeb6 100644 --- a/migrations/receipt_repair.go +++ b/migrations/receipt_repair.go @@ -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)