Catch getMempoolInfo errors gracefully to not break general main loop
fixes #411
This commit is contained in:
parent
2b1c511611
commit
d942cb48a5
@ -111,7 +111,16 @@ class Server {
|
|||||||
|
|
||||||
async runMainUpdateLoop() {
|
async runMainUpdateLoop() {
|
||||||
try {
|
try {
|
||||||
await memPool.$updateMemPoolInfo();
|
try {
|
||||||
|
await memPool.$updateMemPoolInfo();
|
||||||
|
} catch (e) {
|
||||||
|
const msg = `updateMempoolInfo: ${(e.message || e)}`;
|
||||||
|
if (config.CORE_RPC_MINFEE.ENABLED) {
|
||||||
|
logger.warn(msg);
|
||||||
|
} else {
|
||||||
|
logger.debug(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
await blocks.$updateBlocks();
|
await blocks.$updateBlocks();
|
||||||
await memPool.$updateMempool();
|
await memPool.$updateMempool();
|
||||||
setTimeout(this.runMainUpdateLoop.bind(this), config.MEMPOOL.POLL_RATE_MS);
|
setTimeout(this.runMainUpdateLoop.bind(this), config.MEMPOOL.POLL_RATE_MS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user