mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-17 21:31:45 +01:00
add lnd bolt auto-compact >monthly (#2968)
This commit is contained in:
parent
aca20317c1
commit
8df8dbc6cf
@ -3,7 +3,7 @@
|
||||
## What's new in Version 1.7.2 of RaspiBlitz?
|
||||
|
||||
- Refactor: Cache & Backgroundscan of Systeminfo
|
||||
- New: Compact the LND channel.db on-demand from REPAIR and before backups [issue](https://github.com/rootzoll/raspiblitz/issues/2752)
|
||||
- New: Compact the LND channel.db monthly on restart, on-demand from menu and before backups [issue](https://github.com/rootzoll/raspiblitz/issues/2752)
|
||||
- New: Run C-lightning backup-compact regularly [issue](https://github.com/rootzoll/raspiblitz/issues/2869)
|
||||
- New: Switch LNbits between lnd & c-lightning [issue](https://github.com/rootzoll/raspiblitz/issues/2556)
|
||||
- New: Tallycoin Connect [details](https://github.com/djbooth007/tallycoin_connect#readme)
|
||||
|
@ -35,3 +35,7 @@ bitcoin.mainnet=1
|
||||
autopilot.active=0
|
||||
autopilot.maxchannels=5
|
||||
autopilot.allocation=0.6
|
||||
|
||||
[bolt]
|
||||
db.bolt.auto-compact=true
|
||||
db.bolt.auto-compact-min-age=672h
|
||||
|
@ -104,7 +104,7 @@ if [ "$1" == "prestart" ]; then
|
||||
# SET/UPDATE bitcoin.node
|
||||
echo "# ${network}.node insert/update"
|
||||
setting ${lndConfFile} ${insertLine} "${network}\.node" "${network}d"
|
||||
|
||||
|
||||
|
||||
##### BITCOIND OPTIONS SECTION #####
|
||||
|
||||
@ -186,6 +186,28 @@ if [ "$1" == "prestart" ]; then
|
||||
setting ${lndConfFile} ${insertLine} "accept-keysend" "true"
|
||||
fi
|
||||
|
||||
##### BOLT SECTION #####
|
||||
# https://github.com/lightningnetwork/lnd/blob/0aa0831619cb320dbb74883c37a80ccbdde7f320/sample-lnd.conf#L1205
|
||||
sectionName="bolt"
|
||||
echo "# [${sectionName}] config ..."
|
||||
# make sure lnd config has a [bolt] section
|
||||
sectionExists=$(cat ${lndConfFile} | grep -c "^\[${sectionName}\]")
|
||||
echo "# sectionExists(${sectionExists})"
|
||||
if [ "${sectionExists}" == "0" ]; then
|
||||
echo "# adding section [${sectionName}]"
|
||||
echo "
|
||||
[${sectionName}]
|
||||
" | tee -a ${lndConfFile}
|
||||
fi
|
||||
|
||||
sectionLine=$(cat ${lndConfFile} | grep -n "^\[bolt\]" | cut -d ":" -f1)
|
||||
echo "# sectionLine(${sectionLine})"
|
||||
insertLine=$(expr $sectionLine + 1)
|
||||
|
||||
# make sure API ports are set to standard
|
||||
setting ${lndConfFile} ${insertLine} "db.bolt.auto-compact-min-age" "672h"
|
||||
setting ${lndConfFile} ${insertLine} "db.bolt.auto-compact" "true"
|
||||
|
||||
##### TOR SECTION #####
|
||||
|
||||
if [ "${runBehindTor}" == "on" ]; then
|
||||
|
@ -312,6 +312,10 @@ tlskeypath=/home/bitcoin/.lnd/tls.key
|
||||
bitcoin.active=1
|
||||
bitcoin.${CHAIN}=1
|
||||
bitcoin.node=bitcoind
|
||||
|
||||
[bolt]
|
||||
db.bolt.auto-compact=true
|
||||
db.bolt.auto-compact-min-age=672h
|
||||
" | sudo -u bitcoin tee /home/bitcoin/.lnd/${netprefix}lnd.conf
|
||||
else
|
||||
echo "# The file /home/bitcoin/.lnd/${netprefix}lnd.conf is already present"
|
||||
|
Loading…
x
Reference in New Issue
Block a user