Skip to content

Commit 252b021

Browse files
Merge branch 'main' into ci/add-test
2 parents 8a0f600 + 554cea8 commit 252b021

33 files changed

+1419
-425
lines changed

.docker/algod_config.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.docker/algod_network_template.json

Lines changed: 0 additions & 52 deletions
This file was deleted.

.docker/run.sh

Lines changed: 0 additions & 251 deletions
This file was deleted.

.docker/start_all.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ "$DEBUG" = "1" ]; then
6+
set -x
7+
fi
8+
9+
if [ "$ALGORAND_DATA" != "/algod/data" ]; then
10+
echo "Do not override 'ALGORAND_DATA' environment variable."
11+
exit 1
12+
fi
13+
14+
/node/run/start_empty.sh &
15+
/node/run/start_fast_catchup.sh &
16+
/node/run/start_dev.sh

.docker/start_dev.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ "$DEBUG" = "1" ]; then
6+
set -x
7+
fi
8+
9+
if [ "$ALGORAND_DATA" != "/algod/data" ]; then
10+
echo "Do not override 'ALGORAND_DATA' environment variable."
11+
exit 1
12+
fi
13+
14+
# Configure the participation node
15+
if [ -d "$ALGORAND_DATA" ]; then
16+
if [ -f "$ALGORAND_DATA/genesis.json" ]; then
17+
if [ "$TOKEN" != "" ]; then
18+
echo "$TOKEN" >"$EMPTY_DATA/algod.token"
19+
fi
20+
if [ "$ADMIN_TOKEN" != "" ]; then
21+
echo "$ADMIN_TOKEN" >"$EMPTY_DATA/algod.admin.token"
22+
fi
23+
algod -o -d "$ALGORAND_DATA" -l "0.0.0.0:8080"
24+
else
25+
sed -i "s/NUM_ROUNDS/${NUM_ROUNDS:-30000}/" "/node/run/template.json"
26+
sed -i "s/\"NetworkName\": \"\"/\"NetworkName\": \"hack-tui\"/" "/node/run/template.json"
27+
goal network create --noclean -n tuinet -r "${ALGORAND_DATA}/.." -t "/node/run/template.json"
28+
29+
# Cycle Network
30+
goal network start -r "${ALGORAND_DATA}/.."
31+
goal node stop
32+
33+
# Update Tokens
34+
if [ "$TOKEN" != "" ]; then
35+
echo "$TOKEN" >"$ALGORAND_DATA/algod.token"
36+
fi
37+
if [ "$ADMIN_TOKEN" != "" ]; then
38+
echo "$ADMIN_TOKEN" >"$ALGORAND_DATA/algod.admin.token"
39+
fi
40+
# Import wallet
41+
goal account import -m "artefact exist coil life turtle edge edge inside punch glance recycle teach melody diet method pause slam dumb race interest amused side learn able heavy"
42+
43+
algod -o -d "$ALGORAND_DATA" -l "0.0.0.0:8080"
44+
fi
45+
46+
else
47+
echo "$ALGORAND_DATA" does not exist
48+
exit 1
49+
fi

0 commit comments

Comments
 (0)