new health-check based esplora failover mechanism

This commit is contained in:
Mononaut
2023-08-05 13:08:47 +09:00
parent 794a4ded9c
commit 2095f90262
9 changed files with 220 additions and 76 deletions

View File

@@ -91,6 +91,10 @@ class Server {
async startServer(worker = false): Promise<void> {
logger.notice(`Starting Mempool Server${worker ? ' (worker)' : ''}... (${backendInfo.getShortCommitHash()})`);
if (config.MEMPOOL.BACKEND === 'esplora') {
bitcoinApi.startHealthChecks();
}
if (config.DATABASE.ENABLED) {
await DB.checkDbConnection();
try {