Skip to content

Commit 3a32fe7

Browse files
committed
chore(devnet): allow for starting subset of available node types
Among (cardano,mithril,dmq).
1 parent 7b7f6df commit 3a32fe7

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

mithril-test-lab/mithril-devnet/devnet-run.sh

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ echo
3232
pushd ${ARTIFACTS_DIR} > /dev/null
3333

3434
# Start devnet DMQ nodes
35-
if [ "${NODES}" = "dmq" ] || [ "${NODES}" = "*" ]; then
35+
if [[ "${NODES}" = *"dmq"* ]] || [[ "${NODES}" = "*" ]]; then
3636
echo "====================================================================="
3737
echo " Start DMQ nodes"
3838
echo "====================================================================="
@@ -42,7 +42,7 @@ if [ "${NODES}" = "dmq" ] || [ "${NODES}" = "*" ]; then
4242
fi
4343

4444
# Start devnet Cardano nodes
45-
if [ "${NODES}" = "cardano" ] || [ "${NODES}" = "*" ]; then
45+
if [[ "${NODES}" = *"cardano"* ]] || [[ "${NODES}" = "*" ]]; then
4646
echo "====================================================================="
4747
echo " Start Cardano nodes"
4848
echo "====================================================================="
@@ -52,7 +52,7 @@ if [ "${NODES}" = "cardano" ] || [ "${NODES}" = "*" ]; then
5252
fi
5353

5454
# Start devnet Mithril nodes
55-
if [ "${NODES}" = "mithril" ] || [ "${NODES}" = "*" ]; then
55+
if [[ "${NODES}" = *"mithril"* ]] || [[ "${NODES}" = "*" ]]; then
5656
echo ">> Info: Mithril Aggregator will be attached to the first Cardano Full node"
5757
echo ">> Info: Mithril Signers will be attached to each Cardano SPO node"
5858
echo "====================================================================="
@@ -64,20 +64,23 @@ if [ "${NODES}" = "mithril" ] || [ "${NODES}" = "*" ]; then
6464
fi
6565

6666
# Schedule stake delegation
67-
echo "====================================================================="
68-
echo " Schedule Cardano Stake Delegation"
69-
echo "====================================================================="
70-
echo
71-
DELEGATION_ROUND=0
72-
echo ">> Begin scheduled stakes delegation"
73-
while true
74-
do
75-
echo ">> $(date +"%T"): Wait ${DELEGATE_PERIOD}s until next stakes delegation round..."
76-
sleep ${DELEGATE_PERIOD}
77-
DELEGATION_ROUND=$(( $DELEGATION_ROUND + 1 ))
78-
echo ">> Run stakes delegation round #${DELEGATION_ROUND}!"
79-
DELEGATION_ROUND=${DELEGATION_ROUND} ./delegate.sh
80-
done
81-
echo
67+
if [[ "${NODES}" = *"cardano"* ]] || [[ "${NODES}" = "*" ]]; then
68+
echo "====================================================================="
69+
echo " Schedule Cardano Stake Delegation"
70+
echo "====================================================================="
71+
echo
72+
DELEGATION_ROUND=0
73+
echo ">> Begin scheduled stakes delegation"
74+
while true
75+
do
76+
echo ">> $(date +"%T"): Wait ${DELEGATE_PERIOD}s until next stakes delegation round..."
77+
sleep ${DELEGATE_PERIOD}
78+
DELEGATION_ROUND=$(( $DELEGATION_ROUND + 1 ))
79+
echo ">> Run stakes delegation round #${DELEGATION_ROUND}!"
80+
DELEGATION_ROUND=${DELEGATION_ROUND} ./delegate.sh
81+
done
82+
echo
83+
fi
84+
8285

8386
popd

0 commit comments

Comments
 (0)