From 4abb4d0b454ef26c94022f2a4e17c0b998b37147 Mon Sep 17 00:00:00 2001 From: Jedrzej Stuczynski Date: Fri, 6 Mar 2020 12:51:24 +0000 Subject: [PATCH] Updated run_local_network script to work with 0.5.0 --- scripts/run_local_network.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/run_local_network.sh b/scripts/run_local_network.sh index fe2f949408..a890f2bc36 100755 --- a/scripts/run_local_network.sh +++ b/scripts/run_local_network.sh @@ -21,24 +21,32 @@ killall nym-mixnode killall nym-sfw-provider echo "Press CTRL-C to stop." +echo "Make sure you have started nym-directory !" -cargo build +cargo build --release --manifest-path nym-client/Cargo.toml --features=local +cargo build --release --manifest-path mixnode/Cargo.toml --features=local +cargo build --release --manifest-path sfw-provider/Cargo.toml --features=local MAX_LAYERS=3 NUMMIXES=${1:-3} # Set $NUMMIXES to default of 3, but allow the user to set other values if desired + +$PWD/target/release/nym-sfw-provider init --id provider-local --clients-host 127.0.0.1 --mix-host 127.0.0.1 --mix-port 4000 --mix-announce-port 4000 +$PWD/target/release/nym-sfw-provider run --id provider-local & + +sleep 1 + for (( j=0; j<$NUMMIXES; j++ )) # Note: to disable logging (or direct it to another output) modify the constant on top of mixnode or provider; # Will make it later either configurable by flags or config file. do let layer=j%MAX_LAYERS+1 - $PWD/target/debug/nym-mixnode run --port $((9980+$j)) --host "localhost" --layer $layer --directory http://localhost:8080 & + $PWD/target/release/nym-mixnode init --id mix-local$j --host 127.0.0.1 --port $((9980+$j)) --layer $layer --announce-host 127.0.0.1:$((9980+$j)) + $PWD/target/release/nym-mixnode run --id mix-local$j & sleep 1 done -sleep 1 -$PWD/target/debug/nym-sfw-provider run --clientHost "localhost" --mixHost "localhost" --mixPort 9997 --clientPort 9998 --directory http://localhost:8080 # trap call ctrl_c() trap ctrl_c SIGINT SIGTERM SIGTSTP