diff --git a/.gitmodules b/.gitmodules index e69de29..8b13789 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1 @@ + diff --git a/libexec/dapp/dapp---testnet-launch b/libexec/dapp/dapp---testnet-launch index 763cedc..ae64b5a 100755 --- a/libexec/dapp/dapp---testnet-launch +++ b/libexec/dapp/dapp---testnet-launch @@ -10,6 +10,7 @@ period=seconds use a block time instead of instamine accounts=number create multiple accounts (default: 1) save=name after finishing, save snapshot load=name start from a previously saved snapshot +rpc-host=host change RPC host (default: \`localhost') " eval "$( @@ -25,6 +26,7 @@ while [[ $1 ]]; do case $1 in --) shift; break;; --rpc-port) shift; RPC_PORT=$1;; + --rpc-host) shift; RPC_HOST=$1;; --chain-id) shift; CHAINID=$1;; --period) shift; PERIOD=$1;; --accounts) shift; ACCOUNTS=$(($1 - 1));; @@ -77,7 +79,7 @@ else geth 2>/dev/null --datadir "$chaindir" init "$chaindir/config/genesis.json" fi -export ETH_RPC_URL=http://127.0.0.1:$RPC_PORT +export ETH_RPC_URL=http://${RPC_HOST-localhost}:$RPC_PORT port=$((RPC_PORT + 30000)) @@ -95,8 +97,9 @@ set +m geth \ 2> >(tee "$chaindir/geth.log" | grep --line-buffered Success | sed 's/^/geth: /' >&2) \ --datadir "$chaindir" --networkid "$CHAINID" --port="$port" \ + --rpcaddr "${RPC_HOST-localhost}" \ --mine --minerthreads=1 \ - --rpc --rpcapi "web3,eth,net,debug" --rpccorsdomain '*' --nodiscover \ + --rpc --rpcapi "web3,eth,net,debug" --rpccorsdomain '*' \ --rpcport="$RPC_PORT" --unlock="$(IFS=,; echo "${address[*]}")" --password=<(exit) & gethpid=$! @@ -128,4 +131,4 @@ if [[ $1 ]]; then "$@" else while true; do sleep 3600; done -fi +fi \ No newline at end of file