From 218dc489a4566ee371af863415d659d842814eb6 Mon Sep 17 00:00:00 2001 From: openoms Date: Fri, 10 Jul 2020 21:32:43 +0100 Subject: [PATCH 1/2] testnet: fix bitcoind wallet setting --- home.admin/config.scripts/network.wallet.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/network.wallet.sh b/home.admin/config.scripts/network.wallet.sh index 1e3c1597f..0fdd9de14 100644 --- a/home.admin/config.scripts/network.wallet.sh +++ b/home.admin/config.scripts/network.wallet.sh @@ -35,9 +35,11 @@ fi ################### if [ "$1" = "1" ] || [ "$1" = "on" ]; then - if ! grep -Eq "^wallet=wallet.dat" /mnt/hdd/${network}/${network}.conf; then + # specify wallet.dat for mainnet to avoid error on testnet + sudo sed -i "s/^wallet=wallet.dat/main.wallet=wallet.dat/g" /mnt/hdd/${network}/${network}.conf + if ! grep -Eq "^main.wallet=wallet.dat" /mnt/hdd/${network}/${network}.conf; then echo "Enable the multiwallet feature in ${network} core and specify wallet.dat" - echo "wallet=wallet.dat" | sudo tee -a /mnt/hdd/${network}/${network}.conf >/dev/null + echo "main.wallet=wallet.dat" | sudo tee -a /mnt/hdd/${network}/${network}.conf >/dev/null restartService=1 else echo "Multiwallet is active and wallet.dat is used." From 9b8b69fd45c6abd462f1d3f7ab6340377987cd12 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 12 Jul 2020 10:36:16 +0100 Subject: [PATCH 2/2] network.wallet: change conf for test or mainnet --- home.admin/config.scripts/network.wallet.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home.admin/config.scripts/network.wallet.sh b/home.admin/config.scripts/network.wallet.sh index 0fdd9de14..34dc249de 100644 --- a/home.admin/config.scripts/network.wallet.sh +++ b/home.admin/config.scripts/network.wallet.sh @@ -37,9 +37,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # specify wallet.dat for mainnet to avoid error on testnet sudo sed -i "s/^wallet=wallet.dat/main.wallet=wallet.dat/g" /mnt/hdd/${network}/${network}.conf - if ! grep -Eq "^main.wallet=wallet.dat" /mnt/hdd/${network}/${network}.conf; then - echo "Enable the multiwallet feature in ${network} core and specify wallet.dat" - echo "main.wallet=wallet.dat" | sudo tee -a /mnt/hdd/${network}/${network}.conf >/dev/null + if ! grep -Eq "^${chain}.wallet=wallet.dat" /mnt/hdd/${network}/${network}.conf; then + echo "Enable the multiwallet feature in ${network} core ${chain}net and specify wallet.dat" + echo "${chain}.wallet=wallet.dat" | sudo tee -a /mnt/hdd/${network}/${network}.conf >/dev/null restartService=1 else echo "Multiwallet is active and wallet.dat is used."