don't rely on blocks table for cpfp indexing progress

This commit is contained in:
Mononaut committed 2023-01-11 08:44:10 -06:00
1 parent b07781ef98
commit 3ff2a1b9dd
3 files changed
+24 -8

No files matched your search

-1
View File
@@ -806,7 +806,6 @@ class Blocks {
ancestors[vin.txid] = true;
});
}
await blocksRepository.$setCPFPIndexed(hash);
}
}
+6 -1
View File
@@ -4,7 +4,7 @@ import logger from '../logger';
import { Common } from './common';
class DatabaseMigration {
private static currentVersion = 49;
private static currentVersion = 50;
private queryTimeout = 3600_000;
private statisticsAddedIndexed = false;
private uniqueLogs: string[] = [];
@@ -442,6 +442,11 @@ class DatabaseMigration {
await this.$executeQuery('TRUNCATE TABLE `blocks_audits`');
await this.updateToSchemaVersion(49);
}
if (databaseSchemaVersion < 50 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `blocks` DROP COLUMN `cpfp_indexed`');
await this.updateToSchemaVersion(50);
}
}
/**