Never run statistics when mempool not in sync.
This commit is contained in:
parent
9e1ef1b747
commit
29dd6e5d8d
@ -25,15 +25,15 @@ class Statistics {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.runStatistics();
|
this.runStatistics();
|
||||||
this.intervalTimer = setInterval(() => {
|
this.intervalTimer = setInterval(() => {
|
||||||
if (!memPool.isInSync()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.runStatistics();
|
this.runStatistics();
|
||||||
}, 1 * 60 * 1000);
|
}, 1 * 60 * 1000);
|
||||||
}, difference);
|
}, difference);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async runStatistics(): Promise<void> {
|
private async runStatistics(): Promise<void> {
|
||||||
|
if (!memPool.isInSync()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const currentMempool = memPool.getMempool();
|
const currentMempool = memPool.getMempool();
|
||||||
const txPerSecond = memPool.getTxPerSecond();
|
const txPerSecond = memPool.getTxPerSecond();
|
||||||
const vBytesPerSecond = memPool.getVBytesPerSecond();
|
const vBytesPerSecond = memPool.getVBytesPerSecond();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user