txoo: compose env var set network not chain
- no need of using switch in entrypoint - directly set the network instead of chain Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
parent
9cb9062ce8
commit
b02b64ece1
@ -28,4 +28,5 @@ services:
|
|||||||
command:
|
command:
|
||||||
- -r http://rpcuser:VLSsigner1@bitcoind:38332
|
- -r http://rpcuser:VLSsigner1@bitcoind:38332
|
||||||
environment:
|
environment:
|
||||||
- BITCOIN_CHAIN=regtest
|
- BITCOIN_NETWORK=regtest
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ services:
|
|||||||
bitcoin-core:
|
bitcoin-core:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- BITCOIN_CHAIN=test
|
- BITCOIN_NETWORK=testnet
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
@ -1,20 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
LIGHTNING_NETWORK=""
|
|
||||||
|
|
||||||
case $BITCOIN_CHAIN in
|
|
||||||
"test") LIGHTNING_NETWORK=testnet ;;
|
|
||||||
"regtest") LIGHTNING_NETWORK=regtest ;;
|
|
||||||
"main") LIGHTNING_NETWORK=bitcoin ;;
|
|
||||||
"signet") LIGHTNING_NETWORK=signet ;;
|
|
||||||
*) echo "Invalid BITCOIN_CHAIN value: $BITCOIN_CHAIN" && exit 1 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ $(echo "$1" | cut -c1) = "-" ]; then
|
if [ $(echo "$1" | cut -c1) = "-" ]; then
|
||||||
echo "$0: assuming arguments for txood"
|
echo "$0: assuming arguments for txood"
|
||||||
|
|
||||||
set -- txood --network $LIGHTNING_NETWORK "$@"
|
set -- txood --network $BITCOIN_NETWORK "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user