updated testnet and raspiconfig

This commit is contained in:
rootzoll 2018-12-05 15:27:44 +01:00
parent d874741e6b
commit 0e67249b3f

View File

@ -1,10 +1,14 @@
#!/bin/bash
# load network and chain info
network=`cat .network`
chain=$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain')
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#chain} -eq 0 ]; then
echo "gathering chain info ... please wait"
chain=$(${network}-cli getblockchaininfo | jq -r '.chain')
fi
command="lncli --chain=${network} newaddress np2wkh"
command="lncli --chain=${network} --network=${chain}net newaddress np2wkh"
clear
echo "******************************"
@ -17,7 +21,7 @@ echo ""
echo "RESULT:"
# PRECHECK) check if chain is in sync
chainInSync=$(lncli --chain=${network} getinfo | grep '"synced_to_chain": true' -c)
chainInSync=$(lncli --chain=${network} --network=${chain}net getinfo | grep '"synced_to_chain": true' -c)
if [ ${chainInSync} -eq 0 ]; then
command=""
result="FAIL PRECHECK - lncli getinfo shows 'synced_to_chain': false - wait until chain is sync "