mirror of
https://github.com/openoms/joininbox.git
synced 2026-08-13 12:33:14 +02:00
* chore: update wallet creation to use watch-only-descriptor-wallet * remove duplicate version check * fix: update release URL in install script and correct typo in wallet import message * ci: test amd64 image descriptor wallet migration with Bats * ci: boot amd64 image tests with OVMF pflash * fix: gate descriptor wallet migration on Bitcoin Core v30 Detect the connected Bitcoin Core version over RPC before migrating. Keep wallet.dat for v29.x or when the version cannot be determined. Add regression coverage for both migration and compatibility paths. * ci: make amd64 image tests independent of guest apt Inject a pinned bats-core checkout into the temporary VM instead of installing Bats through the guest package repositories. Remove the duplicate pull request trigger and simplify artifact lookup. * ci: harden image build run * docs(FAQ): how automatic migration works
49 lines
1.5 KiB
Bash
Executable file
49 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
source /home/joinmarket/joinin.conf
|
|
source /home/joinmarket/_functions.sh
|
|
|
|
# check connectedRemoteNode var in joinin.conf
|
|
if ! grep -Eq "^connectedRemoteNode=" $joininConfPath; then
|
|
echo "connectedRemoteNode=off" >>$joininConfPath
|
|
fi
|
|
|
|
if [ "$1" = "signetOn" ]; then
|
|
installBitcoinCore
|
|
installSignet
|
|
if [ "$connectedRemoteNode" = "on" ]; then
|
|
backupJMconf
|
|
fi
|
|
generateJMconfig
|
|
setJMconfigToSignet
|
|
|
|
if [ ${#network} -eq 0 ] || [ "${network}" = "mainnet" ] || [ "${runningEnv}" = "raspiblitz" ]; then
|
|
bitcoinUser="bitcoin"
|
|
cliPath="/usr/local/bin/"
|
|
elif [ "${network}" = "signet" ]; then
|
|
bitcoinUser="joinmarket"
|
|
cliPath="/home/joinmarket/bitcoin/"
|
|
fi
|
|
if [ ! -d /home/${bitcoinUser}/.bitcoin/signet/wallets/watch-only-descriptor-wallet ]; then
|
|
echo "# Create watch-only-descriptor-wallet for signet ..."
|
|
sleep 10
|
|
sudo -u ${bitcoinUser} ${cliPath}/bitcoin-cli -signet -named createwallet wallet_name=watch-only-descriptor-wallet descriptors=true disable_private_keys=true
|
|
fi
|
|
|
|
elif [ "$1" = "signetOff" ]; then
|
|
removeSignetdService
|
|
isSignet=$(grep -c "network = signet" <$JMcfgPath)
|
|
if [ $isSignet -gt 0 ]; then
|
|
echo "# Removing the joinmarket.cfg with signet settings"
|
|
rm -f $JMcfgPath
|
|
else
|
|
echo "# Signet is not set in joinmarket.cfg, leaving settings in place"
|
|
fi
|
|
|
|
# set joinin.conf value
|
|
/home/joinmarket/set.value.sh set network mainnet ${joininConfPath}
|
|
|
|
generateJMconfig
|
|
elif [ "$1" = "downloadCoreOnly" ]; then
|
|
downloadBitcoinCore
|
|
fi
|