Audit past acceleration data

This commit is contained in:
Mononaut
2024-03-11 21:19:03 +00:00
parent 93f547e446
commit 11a4f4e6d9
6 changed files with 228 additions and 40 deletions

View File

@@ -7,7 +7,7 @@ import cpfpRepository from '../repositories/CpfpRepository';
import { RowDataPacket } from 'mysql2';
class DatabaseMigration {
private static currentVersion = 73;
private static currentVersion = 74;
private queryTimeout = 3600_000;
private statisticsAddedIndexed = false;
private uniqueLogs: string[] = [];
@@ -619,6 +619,11 @@ class DatabaseMigration {
this.uniqueLog(logger.notice, `'accelerations' table has been truncated`);
await this.updateToSchemaVersion(73);
}
if (databaseSchemaVersion < 74 && config.MEMPOOL.NETWORK === 'mainnet') {
await this.$executeQuery(`INSERT INTO state(name, number) VALUE ('last_acceleration_block', 0);`);
await this.updateToSchemaVersion(74);
}
}
/**