@@ -8,15 +8,9 @@ here="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)"
8
8
root=" $( cd " $here /.." && pwd) "
9
9
cd " $root "
10
10
11
- waitForEpoch1 () {
12
- while [ ` CARDANO_NODE_SOCKET_PATH=$PWD /network-files/node-sp1/node.sock cardano-cli query tip --testnet-magic 888 | jq -r .epoch` == " 0" ] ; do
13
- sleep 5
14
- done
15
- }
16
-
17
11
healthy () {
18
- sleep 20
19
- waitForEpoch1
12
+ # For some unknown reasons, if started before half of first epoch, db-sync doesn't sync
13
+ while [ ` cardano-cli query tip --testnet-magic 888 | jq .slot ` -lt 500 ] ; do sleep 1 ; done
20
14
touch ./network-files/run/healthy
21
15
}
22
16
@@ -33,19 +27,29 @@ trap 'kill 0' INT
33
27
echo " Run"
34
28
./scripts/make-babbage.sh
35
29
./network-files/run/all.sh &
36
- CARDANO_NODE_SOCKET_PATH=$PWD /network-files/node-sp1/node.sock ./scripts/setup-new-delegator-keys.sh
30
+
31
+ export CARDANO_NODE_SOCKET_PATH=$PWD /network-files/node-sp1/node.sock
32
+
33
+ while [ ! -S " $CARDANO_NODE_SOCKET_PATH " ]; do
34
+ echo " start.sh: CARDANO_NODE_SOCKET_PATH: $CARDANO_NODE_SOCKET_PATH file doesn't exist, waiting..."
35
+ sleep 1
36
+ done
37
+
38
+ while [ ` cardano-cli query tip --testnet-magic 888 | jq .block` == null ] ; do
39
+ echo " start.sh: WAIT_FOR_TIP: Waiting for a tip..."
40
+ sleep 1
41
+ done
42
+
37
43
healthy &
38
44
45
+ ./scripts/setup-new-delegator-keys.sh
39
46
./scripts/update-stake-pools.sh.sh " $SP_NODES_ID "
40
47
41
- CARDANO_NODE_SOCKET_PATH=$PWD /network-files/node-sp1/node.sock ./scripts/plutus-transaction.sh
42
- CARDANO_NODE_SOCKET_PATH=$PWD /network-files/node-sp1/node.sock ./scripts/reference-input-transaction.sh
43
- CARDANO_NODE_SOCKET_PATH=$PWD /network-files/node-sp1/node.sock ./scripts/mint-tokens.sh
44
- CARDANO_NODE_SOCKET_PATH=$PWD /network-files/node-sp1/node.sock ./scripts/setup-wallets.sh
45
- CARDANO_NODE_SOCKET_PATH=$PWD /network-files/node-sp1/node.sock ./scripts/mint-handles.sh
46
-
47
- waitForEpoch1
48
- sleep 50
48
+ ./scripts/plutus-transaction.sh
49
+ ./scripts/reference-input-transaction.sh
50
+ ./scripts/mint-tokens.sh
51
+ ./scripts/setup-wallets.sh
52
+ ./scripts/mint-handles.sh
49
53
50
54
touch ./network-files/run/done
51
55
0 commit comments