You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeti uses fixed values for dbcache and prune, which occasionally causes problems, but we can make optimum use of the user's machine's resources if we call a command to check for available memory and free disc space on first start up.
## custom prune code
installed=$(mkdir .bitcoin 2>&1 | grep "File exists" -c) # makes ~/.bitcoin folder. If it didn't exist, installed=0
touch .bitcoin/bitcoin.conf
if [ ${installed} -eq 0 ]; then
free_space=$(awk 'FNR ==2 {print $4+0}' <(df -BM /)) # free space in MB
echo "prune=$(( free_space - 10000 ))" >> .bitcoin/bitcoin.conf # subtracts 10 GB from freespace to allow for chainstate, allocates the rest to block storage.
fi
## custom dbcache code
available=$(awk '/^Mem/ {print $7}' <(free -m)) # total available memory
gnome-terminal -- ./bitcoin-qt -server -dbcache=$((available - 300)) #-proxy=127.0.0.1:9050 # Launch Bitcoin Core in new window, necessary to use Bitcoin-cli command line interface in this script, -proxy tells it to use Tor. Sets dbcache to use all available memory less the <300 MB core uses when dbcache=0
The text was updated successfully, but these errors were encountered:
Yeti uses fixed values for dbcache and prune, which occasionally causes problems, but we can make optimum use of the user's machine's resources if we call a command to check for available memory and free disc space on first start up.
The text was updated successfully, but these errors were encountered: