clean more old litecoin references

This commit is contained in:
rootzoll 2021-12-09 14:08:04 +01:00
parent 54bc9fa7ae
commit ab89fe87eb
19 changed files with 20 additions and 129 deletions

View File

@ -69,9 +69,6 @@ fi
# prepare coin info
coininfo="Bitcoin"
if [ "$network" = "litecoin" ]; then
coininfo="Litecoin"
fi
if [ "$chain" = "test" ]; then
coininfo="TESTNET Bitcoin"
fi

View File

@ -218,9 +218,6 @@ else
echo "http://mempoolhqx4isw62xs7abwphsq7ldayuidyx2v2oethdhhj6mlo2r6ad.onion/${chain}net/tx/${fundingTX}"
fi
fi
if [ "${network}" = "litecoin" ]; then
echo "https://live.blockcypher.com/ltc/tx/${fundingTX}/"
fi
fi
echo
echo "Press ENTER to return to main menu."

View File

@ -65,25 +65,17 @@ if [ ${openChannels} -eq 0 ]; then
fi
paymentRequestStart="???"
if [ "${network}" = "bitcoin" ]; then
if [ "${chain}" = "main" ]; then
paymentRequestStart="lnbc"
else
paymentRequestStart="lntb"
fi
elif [ "${network}" = "litecoin" ]; then
paymentRequestStart="lnltc"
if [ "${chain}" = "main" ]; then
paymentRequestStart="lnbc"
else
paymentRequestStart="lntb"
fi
testSite="???"
if [ "${network}" = "bitcoin" ]; then
if [ "${chain}" = "main" ]; then
testSite="https://satoshis.place"
else
testSite="https://starblocks.acinq.co/"
fi
elif [ "${network}" = "litecoin" ]; then
testSite="https://millionlitecoinhomepage.net"
if [ "${chain}" = "main" ]; then
testSite="https://satoshis.place"
else
testSite="https://starblocks.acinq.co/"
fi
# let user enter the invoice

View File

@ -17,7 +17,6 @@ if [ "${extraParameter}" = "-all" ]; then
sudo systemctl stop lnd.service 2>/dev/null
echo "# - blockchain"
sudo systemctl stop bitcoind.service 2>/dev/null
sudo systemctl stop litecoind.service 2>/dev/null
# delete plain all on HDD
echo "# cleaning HDD ... (please wait)"
@ -38,7 +37,6 @@ elif [ "${extraParameter}" = "-blockchain" ]; then
sudo systemctl stop lnd.service 2>/dev/null
echo "# - blockchain"
sudo systemctl stop bitcoind.service 2>/dev/null
sudo systemctl stop litecoind.service 2>/dev/null
echo ""
echo "# DELETING ..."
@ -72,7 +70,6 @@ else
echo "- blockchain"
sudo systemctl stop bitcoind.service 2>/dev/null
sudo systemctl stop litecoind.service 2>/dev/null
# just delete selective
echo "selective delete ... (please wait)"
@ -87,7 +84,7 @@ else
sudo rm -f /mnt/hdd/bitcoin/testnet3/.* 2>/dev/null
sudo rm -f -r /mnt/hdd/bitcoin/testnet/database
# litecoin mainnet (clean working files)
# litecoin mainnet (clean working files) -- keep for legacy clean up reasons
sudo rm -f /mnt/hdd/litecoin/* 2>/dev/null
sudo rm -f /mnt/hdd/litecoin/.* 2>/dev/null
sudo rm -f -r /mnt/hdd/litecoin/database

View File

@ -233,7 +233,7 @@ sleep 5
################################
# resetting start count files
echo "SYSTEMD RESTART LOG: blockchain (bitcoind/litecoind)" > /home/admin/systemd.blockchain.log
echo "SYSTEMD RESTART LOG: blockchain (bitcoind)" > /home/admin/systemd.blockchain.log
echo "SYSTEMD RESTART LOG: lightning (LND)" > /home/admin/systemd.lightning.log
sudo chmod 666 /home/admin/systemd.blockchain.log
sudo chmod 666 /home/admin/systemd.lightning.log
@ -425,7 +425,6 @@ if [ ${isMounted} -eq 0 ]; then
echo "hddCandidate='${hddCandidate}'" >> ${infoFile}
echo "hddGigaBytes=${hddGigaBytes}" >> ${infoFile}
echo "hddBlocksBitcoin=${hddBlocksBitcoin}" >> ${infoFile}
echo "hddBlocksLitecoin=${hddBlocksLitecoin}" >> ${infoFile}
echo "hddGotMigrationData=${hddGotMigrationData}" >> ${infoFile}
echo ""
echo "HDD is there but not AutoMounted yet - Waiting for user Setup/Update" >> $logFile

View File

@ -174,7 +174,7 @@ if [ "${lightning}" == "lnd" ]; then
# preparing new LND config
echo "Creating new LND config ..." >> ${logFile}
sudo -u bitcoin mkdir /mnt/hdd/lnd 2> /dev/null
sudo cp /home/admin/assets/lnd.${network}.conf /mnt/hdd/lnd/lnd.conf
sudo cp /home/admin/assets/lnd.bitcoin.conf /mnt/hdd/lnd/lnd.conf
sudo chown bitcoin:bitcoin /mnt/hdd/lnd/lnd.conf
sudo /home/admin/config.scripts/lnd.install.sh on mainnet
sudo /home/admin/config.scripts/lnd.setname.sh mainnet ${hostname}
@ -201,9 +201,7 @@ if [ "${lightning}" == "lnd" ]; then
sudo systemctl stop lnd 2>/dev/null
sudo systemctl disable lnd 2>/dev/null
# make sure lnd gets started after blockchain service
sed -i "5s/.*/Wants=${network}d.service/" /home/admin/assets/lnd.service >> ${logFile}
sed -i "6s/.*/After=${network}d.service/" /home/admin/assets/lnd.service >> ${logFile}
# copy lnd service
sudo cp /home/admin/assets/lnd.service /etc/systemd/system/lnd.service >> ${logFile}
# start lnd up

View File

@ -163,8 +163,6 @@ sudo systemctl start ${network}d.service >> ${logFile}
if [ "${lightning}" == "lnd" ]; then
# prepare lnd service
sed -i "5s/.*/Wants=${network}d.service/" /home/admin/assets/lnd.service >> ${logFile} 2>&1
sed -i "6s/.*/After=${network}d.service/" /home/admin/assets/lnd.service >> ${logFile} 2>&1
sudo cp /home/admin/assets/lnd.service /etc/systemd/system/lnd.service >> ${logFile} 2>&1
# convert old keysend by lndExtraParameter to raspiblitz.conf setting (will be enforced by lnd.check.sh prestart) since 1.7.1

View File

@ -206,8 +206,6 @@ echo "allow: bitcoin testnet"
sudo ufw allow 18333 comment 'bitcoin testnet'
echo "allow: bitcoin mainnet"
sudo ufw allow 8333 comment 'bitcoin mainnet'
echo "allow: litecoin mainnet"
sudo ufw allow 9333 comment 'litecoin mainnet'
echo 'allow: lightning testnet'
sudo ufw allow 19735 comment 'lightning testnet'
echo "allow: lightning mainnet"

View File

@ -1,35 +0,0 @@
# lnd configuration - some values might be overruled directly systemd-service exec call parameters
[Application Options]
debuglevel=debug
maxpendingchannels=5
alias=raspiblitz
color=#68F442
nat=false
# Avoid historical graph data sync
ignore-historical-gossip-filters=1
# Avoid slow startup time
sync-freelist=1
# Avoid high startup overhead
stagger-initial-reconnect=1
# Delete and recreate RPC TLS certificate when details change or cert expires
tlsautorefresh=1
# Do not include IPs in the RPC TLS certificate
tlsdisableautofill=1
# RPC open to all connections on Port 10009
rpclisten=0.0.0.0:10009
# REST open to all connections on Port 8080
restlisten=0.0.0.0:8080
[Litecoin]
litecoin.active=1
litecoin.mainnet=1
litecoin.node=litecoind
[autopilot]
autopilot.active=0
autopilot.maxchannels=5
autopilot.allocation=0.6

View File

@ -48,24 +48,6 @@
/>
</item>
<item>
<guid>http://github.com/rootzoll/raspiblitz/raw/v1.3/home.admin/assets/raspiblitz-litecoin2-2019-06-29-base.torrent</guid>
<title>raspiblitz-litecoin1-2018-11-18-base.torrent</title>
<enclosure
url="http://github.com/rootzoll/raspiblitz/raw/v1.3/home.admin/assets/raspiblitz-litecoin2-2019-06-29-base.torrent"
type="application/x-bittorrent"
/>
</item>
<item>
<guid>http://github.com/rootzoll/raspiblitz/raw/v1.3/home.admin/assets/raspiblitz-litecoin2-2019-06-29-update.torrent</guid>
<title>raspiblitz-litecoin1-2018-11-18-update.torrent</title>
<enclosure
url="http://github.com/rootzoll/raspiblitz/raw/v1.3/home.admin/assets/raspiblitz-litecoin2-2019-06-29-update.torrent"
type="application/x-bittorrent"
/>
</item>
<item>
<guid>http://github.com/rootzoll/raspiblitz/raw/v1.4/home.admin/assets/raspiblitz-bitcoin2-2020-01-28-update.torrent</guid>
<title>raspiblitz-bitcoin2-2020-01-28-update.torrent</title>

View File

@ -12,7 +12,7 @@ source /home/admin/raspiblitz.info 2>/dev/null
source /mnt/hdd/raspiblitz.conf 2>/dev/null
# check that blockchain is set & supported
if [ "${network}" != "bitcoin" ] && [ "${network}" != "litecoin" ]; then
if [ "${network}" != "bitcoin" ]; then
echo "blockchain='{$network}'"
echo "error='blockchain type missing or not supported'"
exit 1

View File

@ -323,7 +323,7 @@ if [ "$1" = "export" ]; then
# collect files to exclude in export in temp file
echo "*.tar.gz" > ~/.exclude.temp
echo "/mnt/hdd/bitcoin" >> ~/.exclude.temp
echo "/mnt/hdd/litecoin" >> ~/.exclude.temp
echo "/mnt/hdd/litecoin" >> ~/.exclude.temp # keep for legacy reasons
echo "/mnt/hdd/swapfile" >> ~/.exclude.temp
echo "/mnt/hdd/temp" >> ~/.exclude.temp
echo "/mnt/hdd/lost+found" >> ~/.exclude.temp
@ -461,7 +461,7 @@ if [ "$1" = "import" ]; then
exit 1
fi
# copy bitcoin/litecoin data backups back to original places (if part of backup)
# copy bitcoin data backups back to original places (if part of backup)
if [ -d "/mnt/hdd/backup_bitcoin" ]; then
echo "# Copying back bitcoin backup data .."
sudo mkdir /mnt/hdd/bitcoin

View File

@ -8,7 +8,6 @@
# Usage
# $ lnchannels to display lnd mainnet channels
# $ lnchannels --testnet to display lnd testnet channels
# $ lnchannels litecoin to display lnd litecoin channels
# Set default (mainnet)
lncli='/usr/local/bin/lncli'

View File

@ -267,18 +267,7 @@ elif [ "$1" == "basic-setup" ]; then
fi
# get network from config (BLOCKCHAIN)
lndNetwork=""
source <(sudo cat /mnt/hdd/lnd/lnd.conf 2>/dev/null | grep 'bitcoin.active' | sed 's/^[a-z]*\./bitcoin_/g')
source <(sudo cat /mnt/hdd/lnd/lnd.conf 2>/dev/null | grep 'litecoin.active' | sed 's/^[a-z]*\./litecoin_/g')
if [ "${bitcoin_active}" == "1" ] && [ "${litecoin_active}" == "1" ]; then
echo "err='lnd.conf: bitcoin and litecoin are set active at the same time'"
elif [ "${bitcoin_active}" == "1" ]; then
lndNetwork="bitcoin"
elif [ "${litecoin_active}" == "1" ]; then
lndNetwork="litecoin"
else
echo "err='lnd.conf: no blockchain network is set'"
fi
lndNetwork="bitcoin"
echo "network='${lndNetwork}'"
# check if network is same the raspiblitz config

View File

@ -17,7 +17,7 @@ source /mnt/hdd/raspiblitz.conf
function copy_mac_set_perms() {
local file_name=${1} # the file name (e.g. admin.macaroon)
local group_name=${2} # the unix group name (e.g. lndadmin)
local n=${3:-bitcoin} # the network (e.g. bitcoin or litecoin) defaults to bitcoin
local n=${3:-bitcoin} # the network (e.g. bitcoin) defaults to bitcoin
local c=${4:-main} # the chain (e.g. main, test, sim, reg) defaults to main (for mainnet)
sudo /bin/cp /mnt/hdd/lnd/data/chain/"${n}"/"${c}"net/"${file_name}" /mnt/hdd/app-data/lnd/data/chain/"${n}"/"${c}"net/"${file_name}"
@ -31,7 +31,7 @@ missing=0
for macaroon in $macaroons
do
local file_name=${macaroon}
local n=${1:-bitcoin} # the network (e.g. bitcoin or litecoin) defaults to bitcoin
local n=${1:-bitcoin} # the network (e.g. bitcoin) defaults to bitcoin
local c=${2:-main} # the chain (e.g. main, test, sim, reg) defaults to main (for mainnet)
if [ ! -f /mnt/hdd/app-data/lnd/data/chain/"${n}"/"${c}"net/"${macaroon}" ]; then
missing=$(($missing + 1))

View File

@ -24,12 +24,6 @@ if [ ${#network} -eq 0 ]; then
exit 1
fi
# testnet on litecoin cannot be set
if [ "${network}" = "litecoin" ] && [ "$1" = "testnet" ]; then
echo "FAIL - no lightning support for litecoin testnet"
exit 1
fi
# stop services
echo "making sure services are not running"
sudo systemctl stop lnd 2>/dev/null

View File

@ -130,9 +130,6 @@ if [ "${setupPhase}" == "setup" ]; then
# check if there is a blockchain to use (so HDD is already formatted)
# thats also true if the node is coming from another nodeOS
existingBlockchain=""
if [ "${hddBlocksLitecoin}" == "1" ]; then
existingBlockchain="LITECOIN"
fi
if [ "${hddBlocksBitcoin}" == "1" ] || [ "${hddGotMigrationData}" != "" ]; then
existingBlockchain="BITCOIN"
fi
@ -194,11 +191,7 @@ if [ "${setupPhase}" == "setup" ]; then
# by keeping that blockchain - user chose already the blockchain type
echo "Selecting as blockchain network automatically .."
if [ "${hddBlocksLitecoin}" == "1" ]; then
echo "network=litecoin" >> $SETUPFILE
else
echo "network=bitcoin" >> $SETUPFILE
fi
echo "network=bitcoin" >> $SETUPFILE
else

View File

@ -20,7 +20,6 @@ if [ "${network}" == "" ]; then
OPTIONS=()
OPTIONS+=(BITCOIN "Setup BITCOIN Blockchain (BitcoinCore)")
OPTIONS+=(LITECOIN "Setup LITECOIN Blockchain (experimental)")
CHOICE=$(dialog --clear \
--backtitle "RaspiBlitz ${codeVersion} - Setup" \
--title "⚡ Blockchain ⚡" \
@ -34,12 +33,6 @@ if [ "${network}" == "" ]; then
# bitcoin core
network="bitcoin"
;;
LITECOIN)
# litecoin
network="litecoin"
# can only work with LND
lightning="lnd"
;;
*)
clear
echo "User Cancel"

View File

@ -180,7 +180,7 @@ elif [ "${eventID}" == "waitsetup" ] && [ "${mode}" == "lcd" ]; then
backtitle="${backtitle} / ${ramGB}GB RAM"
# display if HDD conatains blockhain or not
if [ "${hddBlocksBitcoin}" == "1" ] || [ "${hddBlocksLitecoin}" == "1" ]; then
if [ "${hddBlocksBitcoin}" == "1" ]; then
backtitle="${backtitle} / ${hddGigaBytes}GB (pre-synced)"
else
backtitle="${backtitle} / ${hddGigaBytes}GB HDD"