Skip to content

Commit

Permalink
[fix] #0: Modify test_env.sh to allocate storage for each peer
Browse files Browse the repository at this point in the history
Signed-off-by: Shunkichi Sato <49983831+s8sato@users.noreply.github.com>
  • Loading branch information
s8sato committed Aug 25, 2022
1 parent 5045240 commit 274b96c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function set_up_peers_common {
}

function bulk_export {
export KURA_BLOCK_STORE_PATH
export TORII_P2P_ADDR
export TORII_API_URL
export TORII_TELEMETRY_URL
Expand All @@ -84,12 +85,17 @@ function bulk_export {
}

function run_peer () {
PEER="$TEST/peers/$1"
mkdir -p "$PEER"
STORAGE="$PEER/storage"
mkdir -p "$STORAGE"
KURA_BLOCK_STORE_PATH="$STORAGE"
TORII_P2P_ADDR="$HOST:${p2p_ports[$1]}"
TORII_API_URL="$HOST:${api_ports[$1]}"
TORII_TELEMETRY_URL="$HOST:${telemetry_ports[$1]}"
IROHA_PUBLIC_KEY=${public_keys[$1]}
IROHA_PRIVATE_KEY="{ \"digest_function\": \"ed25519\", \"payload\": \"${private_keys[$1]}\" }"
exec -a "$1" "$TEST/peers/iroha" "$2" > "$TEST/peers/$1.log" & disown
exec -a "$1" "$TEST/peers/iroha" "$2" > "$PEER/.log" & disown
}

function run_4_peers {
Expand Down

0 comments on commit 274b96c

Please sign in to comment.