Don't delete transactions when checking if the current chain is valid

This commit is contained in:
nymkappa
2023-03-31 12:22:26 +09:00
parent 44bbb472d3
commit 816fb3bf01
2 changed files with 0 additions and 18 deletions

View File

@@ -82,23 +82,6 @@ class BlocksSummariesRepository {
return [];
}
/**
* Delete blocks from the database from blockHeight
*/
public async $deleteTransactionsFrom(blockHeight: number): Promise<void> {
logger.info(`Delete blocks summaries transactions from height ${blockHeight} from the database, but keep templates`, logger.tags.mining);
try {
await DB.query(`
UPDATE blocks_summaries
SET transactions = '[]'
WHERE height >= ${blockHeight}
`);
} catch (e) {
logger.err('Cannot delete blocks summaries transactions. Reason: ' + (e instanceof Error ? e.message : e));
}
}
/**
* Get the fee percentiles if the block has already been indexed, [] otherwise
*