mirror of
https://github.com/mempool/mempool.git
synced 2025-01-19 05:34:03 +01:00
Fix database used when database disabled
This commit is contained in:
parent
5e10b75b87
commit
9734052477
@ -127,7 +127,7 @@ class PoolsParser {
|
||||
if (!equals(JSON.parse(existingPool.addresses), poolObj.addresses) || !equals(JSON.parse(existingPool.regexes), poolObj.regexes)) {
|
||||
finalPoolDataUpdate.push(poolObj);
|
||||
}
|
||||
} else {
|
||||
} else if (config.DATABASE.ENABLED) {
|
||||
// Double check that if we're not just renaming a pool (same address same regex)
|
||||
const [poolToRename]: any[] = await DB.query(`
|
||||
SELECT * FROM pools
|
||||
|
@ -105,7 +105,9 @@ class Server {
|
||||
.use(express.text({ type: ['text/plain', 'application/base64'] }))
|
||||
;
|
||||
|
||||
await priceUpdater.$initializeLatestPriceWithDb();
|
||||
if (config.DATABASE.ENABLED) {
|
||||
await priceUpdater.$initializeLatestPriceWithDb();
|
||||
}
|
||||
|
||||
this.server = http.createServer(this.app);
|
||||
this.wss = new WebSocket.Server({ server: this.server });
|
||||
|
Loading…
Reference in New Issue
Block a user