Set in sync to false when mempool clear protection is active.

refs #76
This commit is contained in:
softsimon
2020-06-18 14:34:56 +07:00
parent 6688421e39
commit b92eef8198
2 changed files with 1 additions and 4 deletions

View File

@@ -127,6 +127,7 @@ class Mempool {
// Prevent mempool from clear on bitcoind restart by delaying the deletion
if (this.mempoolProtection === 0 && transactions.length < currentMempoolSize / 2) {
this.mempoolProtection = 1;
this.inSync = false;
console.log('Mempool clear protection triggered.');
setTimeout(() => {
this.mempoolProtection = 2;