set recovery window by default

This commit is contained in:
rootzoll 2022-01-18 00:16:27 +01:00
parent 93c1903580
commit 2ded9deb98
2 changed files with 2 additions and 7 deletions

View File

@ -246,7 +246,7 @@ function restoreSCB()
fi
fi
echo "WALLET --> SCB "
echo "WALLET --> SEED + SCB "
/home/admin/_cache.sh set message "LND Wallet (SEED & SCB)"
macaroonPath="/home/admin/.lnd/data/chain/${network}/${chain}net/admin.macaroon"
source <(/home/admin/config.scripts/lnd.initwallet.py scb ${chain}net "/home/admin/channel.backup" "${macaroonPath}")

View File

@ -96,12 +96,7 @@ while [ ${fallback} -eq 0 ]
loopCount=$(($loopCount +1))
echo "# calling: lncli unlock"
recoveryOption=""
if [ "${fundRecovery}" == "1" ]; then
recoveryOption="--recovery_window=1000 "
echo "# running unlock with ${recoveryOption}"
fi
result=$(echo "$passwordC" | $lncli_alias unlock ${recoveryOption}--stdin 2>&1)
result=$(echo "$passwordC" | $lncli_alias unlock --recovery_window=1000 --stdin 2>&1)
wasUnlocked=$(echo "${result}" | grep -c 'successfully unlocked')
wrongPassword=$(echo "${result}" | grep -c 'invalid passphrase')
if [ ${wasUnlocked} -gt 0 ]; then