Fix dogecoin regtest and testnet support

This commit is contained in:
nicolas.dorier 2022-06-22 16:55:49 +09:00
parent 65b70cbf85
commit 4c14ec5efb
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -4,7 +4,19 @@ set -e
if [[ "$1" == "dogecoin-cli" || "$1" == "dogecoin-tx" || "$1" == "dogecoind" || "$1" == "test_dogecoin" ]]; then
mkdir -p "$DOGECOIN_DATA"
CONFIG_PREFIX=""
if [[ "${BITCOIN_NETWORK}" == "regtest" ]]; then
CONFIG_PREFIX=$'regtest=1\n'
fi
if [[ "${BITCOIN_NETWORK}" == "testnet" ]]; then
CONFIG_PREFIX=$'testnet=1\n'
fi
if [[ "${BITCOIN_NETWORK}" == "mainnet" ]]; then
CONFIG_PREFIX=$'mainnet=1\n'
fi
cat <<-EOF > "$DOGECOIN_DATA/dogecoin.conf"
${CONFIG_PREFIX}
printtoconsole=1
rpcallowip=::/0
${DOGECOIN_EXTRA_ARGS}