diff --git a/env.example b/env.example index b238ad6d..d35a7c0f 100644 --- a/env.example +++ b/env.example @@ -19,6 +19,14 @@ #DATABASE_FILE=db.sqlite #METRICS_DATABASE_FILE=metrics.sqlite #LOGS_DIR=logs +# directory where app data will be stored +#DATA_DIR= +# Pub will generate a ranom secret to encrypt the seed phrase in the database. +# Specify a location only if you require privleged storage, else it will be stored in the Pub data dir. +#WALLET_SECRET_PATH= +# If using a password file directly within LND's configuration, specify it here for Pub to use it for unlocking. +#WALLET_PASSWORD_PATH= + #LOCALHOST #ADMIN_TOKEN= diff --git a/src/services/metrics/index.ts b/src/services/metrics/index.ts index 90568ffa..b4e1a23b 100644 --- a/src/services/metrics/index.ts +++ b/src/services/metrics/index.ts @@ -327,8 +327,13 @@ export default class Handler { } }) const closed = await Promise.all(closedChannels.filter(c => c.closeType !== ChannelCloseSummary_ClosureType.FUNDING_CANCELED).map(async c => { - const tx = await this.lnd.GetTx(c.closingTxHash) - return { capacity: Number(c.capacity), channel_id: c.chanId, closed_height: c.closeHeight, close_tx_timestamp: Number(tx.timeStamp) } + try { + const tx = await this.lnd.GetTx(c.closingTxHash) + return { capacity: Number(c.capacity), channel_id: c.chanId, closed_height: c.closeHeight, close_tx_timestamp: Number(tx.timeStamp) } + } catch (e) { + return { capacity: Number(c.capacity), channel_id: c.chanId, closed_height: c.closeHeight, close_tx_timestamp: 0 } + } + })) return { nodes: [{