Add Bitcoin Knots v26.1

This commit is contained in:
Taylor Helsper 2024-05-16 00:03:16 -05:00
parent 07b694c292
commit 2f02e2d511
3 changed files with 38 additions and 1 deletions

View File

@ -63,6 +63,39 @@ if [ "$APP" = "ordisrespector" ]; then
echo "24.0.1-ordisrespector" > /home/bitcoin/.mynode/bitcoin_version_latest_custom
echo "24.0.1-ordisrespector" > /mnt/hdd/mynode/settings/bitcoin_version_latest_custom
cd ~
elif [ "$APP" = "knots_26_1" ]; then
# Determin arch
ARCH="UNKNOWN"
if [ $IS_RASPI = 1 ]; then
ARCH="arm-linux-gnueabihf"
if [ $IS_ARM64 = 1 ]; then
ARCH="aarch64-linux-gnu"
fi
elif [ $IS_ROCK64 = 1 ] || [ $IS_ROCKPRO64 = 1 ] || [ $IS_ROCKPI4 = 1 ]; then
ARCH="aarch64-linux-gnu"
elif [ $IS_X86 = 1 ]; then
ARCH="x86_64-linux-gnu"
else
echo "Unknown Bitcoin Version"
exit 1
fi
BTC_UPGRADE_URL=https://bitcoinknots.org/files/26.x/26.1.knots20240513/bitcoin-26.1.knots20240513-$ARCH.tar.gz
rm -rf /opt/download
mkdir -p /opt/download
cd /opt/download
# Download and install
wget $BTC_UPGRADE_URL -O knots.tar.gz
tar -xvf knots.tar.gz
mv bitcoin-* bitcoin
install -m 0755 -o root -g root -t /usr/local/bin bitcoin/bin/*
echo "26.1-knots" > /home/bitcoin/.mynode/bitcoin_version
echo "26.1-knots" > /home/bitcoin/.mynode/bitcoin_version_latest_custom
echo "26.1-knots" > /mnt/hdd/mynode/settings/bitcoin_version_latest_custom
cd ~
elif [ "$APP" = "default" ]; then
# Clear custom info and re-install bitcoin

View File

@ -38,7 +38,10 @@ def get_bitcoin_rpc_password():
def get_bitcoin_version():
global bitcoin_version
if bitcoin_version == None:
bitcoin_version = to_string(subprocess.check_output("bitcoind --version | egrep -o 'v[0-9]+\\.[0-9]+\\.[0-9]+'", shell=True))
try:
bitcoin_version = to_string(subprocess.check_output("bitcoind --version | egrep -o 'v[0-9]+\\.[0-9]+\\.[a-z0-9]+'", shell=True))
except Exception as e:
bitcoin_version = "unknown"
return bitcoin_version
def is_bitcoin_synced():

View File

@ -1087,6 +1087,7 @@
<option value="none" selected="selected">Choose...</option>
<option value="default">Default</option>
<option value="ordisrespector">Ordisrespector (v24.0.1)</option>
<option value="knots_26_1">Bitcoin Knots (v26.1)</option>
</select>
<button id="custom_bitcoin_install_button">Install</button>
</div>