await for mempool change handler after loading disk cache

This commit is contained in:
Mononaut
2023-04-30 13:59:29 -06:00
parent 2d8dea6c2b
commit e6a23567e0
4 changed files with 6 additions and 6 deletions

View File

@@ -205,7 +205,7 @@ class MempoolBlocks {
public async updateBlockTemplates(newMempool: { [txid: string]: TransactionExtended }, added: TransactionExtended[], removed: string[], saveResults: boolean = false): Promise<void> {
if (!this.txSelectionWorker) {
// need to reset the worker
this.makeBlockTemplates(newMempool, saveResults);
await this.makeBlockTemplates(newMempool, saveResults);
return;
}
// prepare a stripped down version of the mempool with only the minimum necessary data