[mining] pool updater is now self contained service

This commit is contained in:
nymkappa
2024-08-20 12:07:20 +02:00
parent ae2ed8fdae
commit 4596394100
2 changed files with 29 additions and 14 deletions

View File

@@ -211,6 +211,8 @@ class Server {
}
});
}
poolsUpdater.$startService();
}
async runMainUpdateLoop(): Promise<void> {
@@ -239,7 +241,6 @@ class Server {
if (config.FIAT_PRICE.ENABLED) {
priceUpdater.$run();
}
await poolsUpdater.updatePoolsJson();
// rerun immediately if we skipped the mempool update, otherwise wait POLL_RATE_MS
const elapsed = Date.now() - start;