Added mempool inSync property to backend. Display on frontend when not in sync and on't create statistics when not in sync.

fixes #29
This commit is contained in:
softsimon
2020-04-01 20:06:44 +07:00
parent 13b0674405
commit 2887a3f1c5
3 changed files with 31 additions and 9 deletions

View File

@@ -23,7 +23,12 @@ class Statistics {
setTimeout(() => {
this.runStatistics();
this.intervalTimer = setInterval(() => { this.runStatistics(); }, 1 * 60 * 1000);
this.intervalTimer = setInterval(() => {
if (!memPool.isInSync()) {
return;
}
this.runStatistics();
}, 1 * 60 * 1000);
}, difference);
}