Fix block acceleration fees calculation & api

This commit is contained in:
Mononaut
2024-03-10 15:08:44 +00:00
parent c55c298fb5
commit a2b0dd3a23
3 changed files with 16 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ import cpfpRepository from '../repositories/CpfpRepository';
import { RowDataPacket } from 'mysql2';
class DatabaseMigration {
private static currentVersion = 72;
private static currentVersion = 73;
private queryTimeout = 3600_000;
private statisticsAddedIndexed = false;
private uniqueLogs: string[] = [];
@@ -612,6 +612,13 @@ class DatabaseMigration {
await this.$executeQuery('UPDATE blocks_summaries SET version = 0 WHERE height >= 832000;');
await this.updateToSchemaVersion(72);
}
if (databaseSchemaVersion < 73 && isBitcoin === true) {
// Clear bad data
await this.$executeQuery(`TRUNCATE accelerations`);
this.uniqueLog(logger.notice, `'accelerations' table has been truncated`);
await this.updateToSchemaVersion(73);
}
}
/**