Wrap block indexing into a try/catch since we don't use async when calling that function
This commit is contained in:
parent
f8f9108ae1
commit
a271c39ba8
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user