We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea28195 commit 79fd911Copy full SHA for 79fd911
1 file changed
scripts/multi-client.sh
@@ -0,0 +1,18 @@
1
+#!/usr/bin/env bash
2
+
3
+set -euo pipefail
4
+trap "exit" INT TERM ERR
5
+trap "kill 0" EXIT
6
7
+NUM_NODES=$1
8
9
+for i in $(seq 1 $NUM_NODES); do
10
+ NODE_ID=amaru-$i
11
+ amaru bootstrap --ledger-dir "${NODE_ID}/ledger.db" --chain-dir "${NODE_ID}/chain.db" --network preview
12
+ amaru --service-name $NODE_ID --with-open-telemetry daemon --peer-address localhost:3000 --listen-address localhost:$(( 4000 + $i)) --ledger-dir "${NODE_ID}/ledger.db" --chain-dir "${NODE_ID}/chain.db" --network preview > $NODE_ID.log 2>&1 &
13
+ PID=$!
14
+ echo $(date -Iseconds) ": launched $NODE_ID (pid=$PID)"
15
+ sleep 60
16
+done
17
18
+wait
0 commit comments