Prevent transaction backlog to cause mempool update halts

This commit is contained in:
Simon Lindh 2019-11-15 17:27:12 +08:00
parent f3e282f4d3
commit a409d5d6d7

View File

@ -122,6 +122,10 @@ class Mempool {
console.log('Error finding transaction in mempool.');
}
}
if ((new Date().getTime()) - start > config.MEMPOOL_REFRESH_RATE_MS * 10) {
break;
}
}
const newMempool: IMempool = {};