fixes
This commit is contained in:
parent
1b63d27e40
commit
88ffb41f05
4 changed files with 11 additions and 8 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -15,8 +15,10 @@ data/
|
|||
.wallet_secret
|
||||
.wallet_password
|
||||
.admin_enroll
|
||||
admin.enroll
|
||||
admin.npub
|
||||
app.nprofile
|
||||
.admin_connect
|
||||
admin.connect
|
||||
debug.txt
|
||||
proto/autogenerated/debug.txt
|
||||
|
|
|
|||
|
|
@ -64,11 +64,11 @@ get_log_info() {
|
|||
|
||||
log "Retrieving connection information..."
|
||||
|
||||
# Wait for either .admin_connect or app.nprofile to appear
|
||||
# Wait for either admin.connect or app.nprofile to appear
|
||||
START_TIME=$(date +%s)
|
||||
while [ $(($(date +%s) - START_TIME)) -lt $MAX_WAIT_TIME ]; do
|
||||
if [ -f "$DATA_DIR/.admin_connect" ]; then
|
||||
admin_connect=$(cat "$DATA_DIR/.admin_connect")
|
||||
if [ -f "$DATA_DIR/admin.connect" ]; then
|
||||
admin_connect=$(cat "$DATA_DIR/admin.connect")
|
||||
# Check if the admin_connect string is complete (contains both nprofile and secret)
|
||||
if [[ $admin_connect == nprofile* ]] && [[ $admin_connect == *:* ]]; then
|
||||
log "An admin has not yet been enrolled."
|
||||
|
|
@ -87,10 +87,10 @@ get_log_info() {
|
|||
sleep $WAIT_INTERVAL
|
||||
done
|
||||
|
||||
if [ ! -f "$DATA_DIR/.admin_connect" ] && [ ! -f "$DATA_DIR/app.nprofile" ]; then
|
||||
log "Neither .admin_connect nor app.nprofile file found after waiting. Please check the service status."
|
||||
if [ ! -f "$DATA_DIR/admin.connect" ] && [ ! -f "$DATA_DIR/app.nprofile" ]; then
|
||||
log "Neither admin.connect nor app.nprofile file found after waiting. Please check the service status."
|
||||
exit 1
|
||||
elif [ -f "$DATA_DIR/.admin_connect" ] && ! [[ $(cat "$DATA_DIR/.admin_connect") == nprofile1* ]] && ! [[ $(cat "$DATA_DIR/.admin_connect") == *:* ]]; then
|
||||
elif [ -f "$DATA_DIR/admin.connect" ] && ! [[ $(cat "$DATA_DIR/admin.connect") == nprofile1* ]] && ! [[ $(cat "$DATA_DIR/admin.connect") == *:* ]]; then
|
||||
log "Admin connect information is incomplete. Please check the service status."
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ install_lightning_pub() {
|
|||
|
||||
# Merge if upgrade
|
||||
if [ $upgrade_status -eq 100 ]; then
|
||||
rsync -a --quiet --exclude='*.sqlite' --exclude='.env' --exclude='logs' --exclude='node_modules' --exclude='.jwt_secret' --exclude='.wallet_secret' --exclude='admin.npub' --exclude='app.nprofile' --exclude='.admin_connect' --exclude='.admin_enroll' $USER_HOME/lightning_pub_temp/ $USER_HOME/lightning_pub/
|
||||
rsync -a --quiet --exclude='*.sqlite' --exclude='.env' --exclude='logs' --exclude='node_modules' --exclude='.jwt_secret' --exclude='.wallet_secret' --exclude='admin.npub' --exclude='app.nprofile' --exclude='admin.connect' --exclude='admin.enroll' $USER_HOME/lightning_pub_temp/ $USER_HOME/lightning_pub/
|
||||
else
|
||||
mv $USER_HOME/lightning_pub_temp $USER_HOME/lightning_pub
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import HtlcTracker from './htlcTracker.js'
|
|||
import { MainSettings } from '../main/settings.js'
|
||||
import { getLogger } from '../helpers/logger.js'
|
||||
import { encodeTLV, usageMetricsToTlv } from '../helpers/tlv.js'
|
||||
import { ChannelCloseSummary_ClosureType } from '../../../proto/lnd/lightning.js'
|
||||
|
||||
|
||||
export default class Handler {
|
||||
|
|
@ -321,7 +322,7 @@ export default class Handler {
|
|||
externalBalance.push({ x: e.block_height, y: e.external_balance })
|
||||
}
|
||||
})
|
||||
const closed = await Promise.all(closedChannels.map(async c => {
|
||||
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) }
|
||||
}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue