From 87405ec4a561add9c28342eaace0790fd920e88b Mon Sep 17 00:00:00 2001 From: nymkappa Date: Fri, 11 Mar 2022 21:09:56 +0100 Subject: [PATCH] Don't try to reset hashrates states if not bitcoin --- backend/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index c2de54521..0a6080b16 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -97,8 +97,10 @@ class Server { await databaseMigration.$truncateIndexedData(tables); } await databaseMigration.$initializeOrMigrateDatabase(); - await this.$resetHashratesIndexingState(); - await poolsParser.migratePoolsJson(); + if (Common.indexingEnabled()) { + await this.$resetHashratesIndexingState(); + await poolsParser.migratePoolsJson(); + } } catch (e) { throw new Error(e instanceof Error ? e.message : 'Error'); }