Hashrates indexing waits for blocks indexing - Batch hashrates I/O ops

This commit is contained in:
nymkappa
2022-02-21 17:34:07 +09:00
parent 9de3c14b3d
commit 150b137f0c
4 changed files with 28 additions and 21 deletions

View File

@@ -20,6 +20,7 @@ class Blocks {
private previousDifficultyRetarget = 0;
private newBlockCallbacks: ((block: BlockExtended, txIds: string[], transactions: TransactionExtended[]) => void)[] = [];
private blockIndexingStarted = false;
public blockIndexingCompleted = false;
constructor() { }
@@ -240,6 +241,8 @@ class Blocks {
logger.err('An error occured in $generateBlockDatabase(). Skipping block indexing. ' + e);
console.log(e);
}
this.blockIndexingCompleted = true;
}
public async $updateBlocks() {