mirror of
https://github.com/mempool/mempool.git
synced 2025-09-27 11:06:20 +02:00
Wrap block indexing into a try/catch since we don't use async when calling that function
This commit is contained in:
@@ -150,6 +150,7 @@ class Blocks {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
let currentBlockHeight = await bitcoinClient.getBlockCount();
|
||||
const indexedBlockCount = await blocksRepository.$blockCount();
|
||||
|
||||
@@ -186,6 +187,9 @@ class Blocks {
|
||||
|
||||
currentBlockHeight -= chunkSize;
|
||||
}
|
||||
} catch (e) {
|
||||
logger.err('An error occured in $generateBlockDatabase(). Skipping block indexing. ' + e);
|
||||
}
|
||||
}
|
||||
|
||||
public async $updateBlocks() {
|
||||
|
Reference in New Issue
Block a user