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