fix: Add network parameter to localnet run

This commit is contained in:
Tyera Eulberg 2018-12-10 15:58:05 -07:00 committed by Michael Vines
parent 3999a14bee
commit ea5db68640
1 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,7 @@ Operate a local testnet
update/up-specific options:
edge - Update/start the "edge" channel network
beta - Update/start the "beta" channel network
-n - Optional Docker network to join
Default channel: $channel
@ -76,6 +77,11 @@ up)
fi
[[ $channel = edge || $channel = beta ]] || usage "Invalid channel: $channel"
if [[ $2 = -n ]]; then
[[ -n $3 ]] || usage "Invalid -n argument"
network="$3"
fi
(
set -x
RUST_LOG=${RUST_LOG:-solana=warn,solana_bpf=info,solana_jsonrpc=info,solana::rpc=info,solana_fullnode=info,solana::drone=info,solana::bank=info,solana::banking_stage=info,solana::system_program=info}
@ -83,6 +89,7 @@ up)
docker run \
--detach \
--name solana-localnet \
--network "$network" \
--rm \
--publish 8899:8899 \
--publish 8900:8900 \