Browse Source

fexed blockchain detection

#146
rootzoll 6 years ago
parent
commit
5e6fd73467
  1. 1
      home.admin/00mainMenu.sh
  2. 3
      home.admin/_bootstrap.sh

1
home.admin/00mainMenu.sh

@ -7,6 +7,7 @@ if [ ${bootstrapInfoExists} -eq 1 ]; then
# load the data from the info file
source /home/admin/raspiblitz.info
echo "Found raspiblitz.info from bootstrap - processing ..."
sleep 2
# if pre-sync is running - stop it
if [ "${state}" = "presync" ]; then

3
home.admin/_bootstrap.sh

@ -169,7 +169,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
# check if HDD contains pre-loaded blockchain data (just bitcoin for now)
echo "Check if HDD contains pre-loaded blockchain data .." >> $logFile
blockchainDataExists=$(ls /mnt/hdd/bitcoin/blocks/blk00000.dat 2>/dev/null | grep -c '.dat')
if [ ${blockchainDataExist} -eq 1 ]; then
if [ ${blockchainDataExists} -eq 1 ]; then
// TODO: Pre-Sync Blockchain
echo "Found pre-loaded blockchain - TODO start pre-sync!" >> $logFile
echo "state=presync" > $infoFile
@ -177,6 +177,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
echo "device=${hddDeviceName}" >> $infoFile
exit 1
else
ls /mnt/hdd/bitcoin/blocks/blk00000.dat >> $logFile
echo "OK - No blockchain data found" >> $logFile
fi

Loading…
Cancel
Save