diff --git a/backend/src/indexer.ts b/backend/src/indexer.ts index 4b120867f..88f44d587 100644 --- a/backend/src/indexer.ts +++ b/backend/src/indexer.ts @@ -6,6 +6,7 @@ import logger from './logger'; import bitcoinClient from './api/bitcoin/bitcoin-client'; import priceUpdater from './tasks/price-updater'; import PricesRepository from './repositories/PricesRepository'; +import config from './config'; export interface CoreIndex { name: string; @@ -72,7 +73,7 @@ class Indexer { return; } - if (task === 'blocksPrices' && !this.tasksRunning.includes(task)) { + if (task === 'blocksPrices' && !this.tasksRunning.includes(task) && !['testnet', 'signet'].includes(config.MEMPOOL.NETWORK)) { this.tasksRunning.push(task); const lastestPriceId = await PricesRepository.$getLatestPriceId(); if (priceUpdater.historyInserted === false || lastestPriceId === null) { diff --git a/backend/src/tasks/lightning/network-sync.service.ts b/backend/src/tasks/lightning/network-sync.service.ts index aca3dbef8..6785b0e2d 100644 --- a/backend/src/tasks/lightning/network-sync.service.ts +++ b/backend/src/tasks/lightning/network-sync.service.ts @@ -269,7 +269,11 @@ class NetworkSyncService { } private async $scanForClosedChannels(): Promise { - if (this.closedChannelsScanBlock === blocks.getCurrentBlockHeight()) { + let currentBlockHeight = blocks.getCurrentBlockHeight(); + if (config.MEMPOOL.ENABLED === false) { // https://github.com/mempool/mempool/issues/3582 + currentBlockHeight = await bitcoinApi.$getBlockHeightTip(); + } + if (this.closedChannelsScanBlock === currentBlockHeight) { logger.debug(`We've already scan closed channels for this block, skipping.`); return; } @@ -305,7 +309,7 @@ class NetworkSyncService { } } - this.closedChannelsScanBlock = blocks.getCurrentBlockHeight(); + this.closedChannelsScanBlock = currentBlockHeight; logger.debug(`Closed channels scan completed at block ${this.closedChannelsScanBlock}`, logger.tags.ln); } catch (e) { logger.err(`$scanForClosedChannels() error: ${e instanceof Error ? e.message : e}`, logger.tags.ln); diff --git a/frontend/src/app/components/change/change.component.html b/frontend/src/app/components/change/change.component.html index 117a0c534..ffc00bf5f 100644 --- a/frontend/src/app/components/change/change.component.html +++ b/frontend/src/app/components/change/change.component.html @@ -1,3 +1,3 @@ - {{ change >= 0 ? '+' : '' }}{{ change | amountShortener }}% + ‎{{ change >= 0 ? '+' : '' }}{{ change | amountShortener }}% diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index e5eb2272b..ac299a547 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -993,6 +993,10 @@ th { margin-right: 10px; } } + + .btn-audit { + margin-left: .5em; + } } .scriptmessage { diff --git a/production/mempool-config.mainnet-lightning.json b/production/mempool-config.mainnet-lightning.json index 21e7109e9..41e42a5bd 100644 --- a/production/mempool-config.mainnet-lightning.json +++ b/production/mempool-config.mainnet-lightning.json @@ -1,5 +1,6 @@ { "MEMPOOL": { + "ENABLED": false, "NETWORK": "mainnet", "BACKEND": "esplora", "HTTP_PORT": 8993, diff --git a/production/mempool-config.signet-lightning.json b/production/mempool-config.signet-lightning.json index 7751d8f0e..9971729e2 100644 --- a/production/mempool-config.signet-lightning.json +++ b/production/mempool-config.signet-lightning.json @@ -1,5 +1,6 @@ { "MEMPOOL": { + "ENABLED": false, "NETWORK": "signet", "BACKEND": "esplora", "HTTP_PORT": 8991, diff --git a/production/mempool-config.testnet-lightning.json b/production/mempool-config.testnet-lightning.json index d8283b779..ff7d4766f 100644 --- a/production/mempool-config.testnet-lightning.json +++ b/production/mempool-config.testnet-lightning.json @@ -1,5 +1,6 @@ { "MEMPOOL": { + "ENABLED": false, "NETWORK": "testnet", "BACKEND": "esplora", "HTTP_PORT": 8992,