Skip to content

Commit 86aa300

Browse files
committed
Parse submit_api port from generated script
1 parent 556dc48 commit 86aa300

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

docker-antithesis/antithesis_run.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,9 @@ except Exception:
112112
_submit_api_script="${CLUSTER_STATE_DIR}/state-cluster0/run-cardano-submit-api"
113113
if [ -x "$_submit_api_script" ]; then
114114
export PATH="/opt/cardano/cardano-submit-api/bin:${PATH}"
115-
# Derive the port the same way cluster_scripts.py does:
116-
# base = PORTS_BASE + instance_num*10 (instance 0 → base = PORTS_BASE)
117-
# submit_api = base + ports_per_instance - 1 - 2 = base + 7
118-
_submit_api_port=$(( ${PORTS_BASE:-23000} + 7 ))
115+
# Parse the port directly from the generated script so we are not
116+
# tied to a specific cluster variant's port formula.
117+
_submit_api_port=$(grep -oE -- '--port [0-9]+' "$_submit_api_script" | grep -oE '[0-9]+')
119118

120119
echo "Starting local cardano-submit-api on port ${_submit_api_port}..."
121120
(cd "${CLUSTER_STATE_DIR}" && exec "${_submit_api_script}") &

0 commit comments

Comments
 (0)