Merge branch 'master' into mononaut/difficulty-updates
This commit is contained in:
commit
4144746e14
@ -6,6 +6,7 @@ import logger from './logger';
|
|||||||
import bitcoinClient from './api/bitcoin/bitcoin-client';
|
import bitcoinClient from './api/bitcoin/bitcoin-client';
|
||||||
import priceUpdater from './tasks/price-updater';
|
import priceUpdater from './tasks/price-updater';
|
||||||
import PricesRepository from './repositories/PricesRepository';
|
import PricesRepository from './repositories/PricesRepository';
|
||||||
|
import config from './config';
|
||||||
|
|
||||||
export interface CoreIndex {
|
export interface CoreIndex {
|
||||||
name: string;
|
name: string;
|
||||||
@ -72,7 +73,7 @@ class Indexer {
|
|||||||
return;
|
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);
|
this.tasksRunning.push(task);
|
||||||
const lastestPriceId = await PricesRepository.$getLatestPriceId();
|
const lastestPriceId = await PricesRepository.$getLatestPriceId();
|
||||||
if (priceUpdater.historyInserted === false || lastestPriceId === null) {
|
if (priceUpdater.historyInserted === false || lastestPriceId === null) {
|
||||||
|
@ -269,7 +269,11 @@ class NetworkSyncService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async $scanForClosedChannels(): Promise<void> {
|
private async $scanForClosedChannels(): Promise<void> {
|
||||||
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.`);
|
logger.debug(`We've already scan closed channels for this block, skipping.`);
|
||||||
return;
|
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);
|
logger.debug(`Closed channels scan completed at block ${this.closedChannelsScanBlock}`, logger.tags.ln);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.err(`$scanForClosedChannels() error: ${e instanceof Error ? e.message : e}`, logger.tags.ln);
|
logger.err(`$scanForClosedChannels() error: ${e instanceof Error ? e.message : e}`, logger.tags.ln);
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<span [style]="change >= 0 ? 'color: #42B747' : 'color: #B74242'">
|
<span [style]="change >= 0 ? 'color: #42B747' : 'color: #B74242'">
|
||||||
{{ change >= 0 ? '+' : '' }}{{ change | amountShortener }}%
|
‎{{ change >= 0 ? '+' : '' }}{{ change | amountShortener }}%
|
||||||
</span>
|
</span>
|
||||||
|
@ -993,6 +993,10 @@ th {
|
|||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-audit {
|
||||||
|
margin-left: .5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.scriptmessage {
|
.scriptmessage {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"MEMPOOL": {
|
"MEMPOOL": {
|
||||||
|
"ENABLED": false,
|
||||||
"NETWORK": "mainnet",
|
"NETWORK": "mainnet",
|
||||||
"BACKEND": "esplora",
|
"BACKEND": "esplora",
|
||||||
"HTTP_PORT": 8993,
|
"HTTP_PORT": 8993,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"MEMPOOL": {
|
"MEMPOOL": {
|
||||||
|
"ENABLED": false,
|
||||||
"NETWORK": "signet",
|
"NETWORK": "signet",
|
||||||
"BACKEND": "esplora",
|
"BACKEND": "esplora",
|
||||||
"HTTP_PORT": 8991,
|
"HTTP_PORT": 8991,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"MEMPOOL": {
|
"MEMPOOL": {
|
||||||
|
"ENABLED": false,
|
||||||
"NETWORK": "testnet",
|
"NETWORK": "testnet",
|
||||||
"BACKEND": "esplora",
|
"BACKEND": "esplora",
|
||||||
"HTTP_PORT": 8992,
|
"HTTP_PORT": 8992,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user