|
|
@ -4,6 +4,7 @@ export APP_BITCOIN_NODE_IP="10.21.21.8" |
|
|
|
export APP_BITCOIN_DATA_DIR="${EXPORTS_APP_DIR}/data/bitcoin" |
|
|
|
export APP_BITCOIN_RPC_PORT="8332" |
|
|
|
export APP_BITCOIN_P2P_PORT="8333" |
|
|
|
export APP_BITCOIN_TOR_PORT="8334" |
|
|
|
export APP_BITCOIN_ZMQ_RAWBLOCK_PORT="28332" |
|
|
|
export APP_BITCOIN_ZMQ_RAWTX_PORT="28333" |
|
|
|
export APP_BITCOIN_ZMQ_HASHBLOCK_PORT="28334" |
|
|
@ -24,10 +25,10 @@ if [[ ! -f "${BITCOIN_ENV_FILE}" ]]; then |
|
|
|
BITCOIN_RPC_AUTH=$(echo "$BITCOIN_RPC_DETAILS" | head -2 | tail -1 | sed -e "s/^rpcauth=//") |
|
|
|
fi |
|
|
|
|
|
|
|
echo "export APP_BITCOIN_NETWORK='${BITCOIN_NETWORK}'" > "${BITCOIN_ENV_FILE}" |
|
|
|
echo "export APP_BITCOIN_NETWORK='${BITCOIN_NETWORK}'" > "${BITCOIN_ENV_FILE}" |
|
|
|
echo "export APP_BITCOIN_RPC_USER='${BITCOIN_RPC_USER}'" >> "${BITCOIN_ENV_FILE}" |
|
|
|
echo "export APP_BITCOIN_RPC_PASS='${BITCOIN_RPC_PASS}'" >> "${BITCOIN_ENV_FILE}" |
|
|
|
echo "export APP_BITCOIN_RPC_AUTH='${BITCOIN_RPC_AUTH}'" >> "${BITCOIN_ENV_FILE}" |
|
|
|
echo "export APP_BITCOIN_RPC_AUTH='${BITCOIN_RPC_AUTH}'" >> "${BITCOIN_ENV_FILE}" |
|
|
|
fi |
|
|
|
|
|
|
|
. "${BITCOIN_ENV_FILE}" |
|
|
@ -38,14 +39,17 @@ elif [[ "${APP_BITCOIN_NETWORK}" == "testnet" ]]; then |
|
|
|
BITCOIN_CHAIN="test" |
|
|
|
export APP_BITCOIN_RPC_PORT="18332" |
|
|
|
export APP_BITCOIN_P2P_PORT="18333" |
|
|
|
export APP_BITCOIN_TOR_PORT="18334" |
|
|
|
elif [[ "${APP_BITCOIN_NETWORK}" == "signet" ]]; then |
|
|
|
BITCOIN_CHAIN="signet" |
|
|
|
export APP_BITCOIN_RPC_PORT="38332" |
|
|
|
export APP_BITCOIN_P2P_PORT="38333" |
|
|
|
export APP_BITCOIN_TOR_PORT="38334" |
|
|
|
elif [[ "${APP_BITCOIN_NETWORK}" == "regtest" ]]; then |
|
|
|
BITCOIN_CHAIN="regtest" |
|
|
|
export APP_BITCOIN_RPC_PORT="18443" |
|
|
|
export APP_BITCOIN_P2P_PORT="18444" |
|
|
|
export APP_BITCOIN_TOR_PORT="18445" |
|
|
|
else |
|
|
|
echo "Warning (${EXPORTS_APP_ID}): Bitcoin Network '${APP_BITCOIN_NETWORK}' is not supported" |
|
|
|
fi |
|
|
@ -54,6 +58,7 @@ BIN_ARGS=() |
|
|
|
BIN_ARGS+=( "-chain=${BITCOIN_CHAIN}" ) |
|
|
|
BIN_ARGS+=( "-proxy=${TOR_PROXY_IP}:${TOR_PROXY_PORT}" ) |
|
|
|
BIN_ARGS+=( "-listen" ) |
|
|
|
BIN_ARGS+=( "-bind=0.0.0.0:${APP_BITCOIN_TOR_PORT}=onion" ) |
|
|
|
BIN_ARGS+=( "-bind=${APP_BITCOIN_NODE_IP}" ) |
|
|
|
BIN_ARGS+=( "-port=${APP_BITCOIN_P2P_PORT}" ) |
|
|
|
BIN_ARGS+=( "-rpcport=${APP_BITCOIN_RPC_PORT}" ) |
|
|
@ -70,7 +75,6 @@ BIN_ARGS+=( "-txindex=1" ) |
|
|
|
BIN_ARGS+=( "-blockfilterindex=1" ) |
|
|
|
BIN_ARGS+=( "-peerbloomfilters=1" ) |
|
|
|
BIN_ARGS+=( "-peerblockfilters=1" ) |
|
|
|
BIN_ARGS+=( "-deprecatedrpc=addresses" ) |
|
|
|
BIN_ARGS+=( "-rpcworkqueue=128" ) |
|
|
|
|
|
|
|
export APP_BITCOIN_COMMAND=$(IFS=" "; echo "${BIN_ARGS[@]}") |
|
|
|