Added MEMPOOL.INDEXING_BLOCKS_AMOUNT in the config (default 432 blocks)

This commit is contained in:
nymkappa committed 2022-01-28 15:01:23 +09:00
1 parent a271c39ba8
commit 647f12ffaa
5 files changed
+23 -9

No files matched your search

@@ -48,6 +48,10 @@ class BlocksRepository {
* Get all block height that have not been indexed between [startHeight, endHeight]
*/
public async $getMissingBlocksBetweenHeights(startHeight: number, endHeight: number): Promise<number[]> {
if (startHeight < endHeight) {
return [];
}
const connection = await DB.pool.getConnection();
const [rows] : any[] = await connection.query(`
SELECT height