From c675d1c498d4e20b2645d20fc8fdb40cb9fb9e4e Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Tue, 28 Mar 2023 23:07:50 +0900 Subject: [PATCH 1/4] Make sure to scan closed channels even if config.MEMPOOL.ENABLE = false --- backend/src/tasks/lightning/network-sync.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/src/tasks/lightning/network-sync.service.ts b/backend/src/tasks/lightning/network-sync.service.ts index 3e5ae1366..fc04f5023 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); From 22ee9916ddbe8f65130d2f63bae7aab739798e57 Mon Sep 17 00:00:00 2001 From: TechMiX Date: Wed, 19 Apr 2023 12:14:21 +0200 Subject: [PATCH 2/4] fix change component and audit button position in RTL mode --- frontend/src/app/components/change/change.component.html | 2 +- frontend/src/styles.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 d9ea867dc..d64450b93 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -988,6 +988,10 @@ th { margin-right: 10px; } } + + .btn-audit { + margin-left: .5em; + } } .scriptmessage { From 6e83bee23fc93234a2f81666e290a5fd93ddff54 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 11 May 2023 11:08:09 -0500 Subject: [PATCH 3/4] ops: Disable mempool loop for lightning backends --- production/mempool-config.mainnet-lightning.json | 1 + production/mempool-config.signet-lightning.json | 1 + production/mempool-config.testnet-lightning.json | 1 + 3 files changed, 3 insertions(+) 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, From ca2830d6d8c4e223c9400fcad52acc92e5597ced Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 11 Jul 2023 16:03:44 +0900 Subject: [PATCH 4/4] fix price updater loop on testnet/signet --- backend/src/indexer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {