From 5a54eab26865aab71a71d871628be1e24680f221 Mon Sep 17 00:00:00 2001 From: ledgerwatch Date: Fri, 4 Jun 2021 15:08:22 +0100 Subject: [PATCH] Fix migration for clean database (#2097) Co-authored-by: Alex Sharp --- migrations/call_trace_index.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migrations/call_trace_index.go b/migrations/call_trace_index.go index bad3177df..1a45e9222 100644 --- a/migrations/call_trace_index.go +++ b/migrations/call_trace_index.go @@ -19,7 +19,7 @@ var rebuilCallTraceIndex = Migration{ } if !sm.CallTraces { // Call traces are not on, nothing to migrate - return nil + return CommitProgress(db, nil, true) } // Find the lowest key in the TraceCallSet table tx := db.(ethdb.HasTx).Tx() @@ -35,12 +35,12 @@ var rebuilCallTraceIndex = Migration{ } if k == nil { log.Warn("Nothing to rebuild, CallTraceSet table is empty") - return nil + return CommitProgress(db, nil, true) } blockNum := binary.BigEndian.Uint64((k)) if blockNum == 0 { log.Warn("Nothing to rebuild, CallTraceSet's first record", "number", blockNum) - return nil + return CommitProgress(db, nil, true) } log.Info("First record in CallTraceTable", "number", blockNum) if err = stages.SaveStageUnwind(db, stages.CallTraces, blockNum-1); err != nil {