File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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} " ) &
You can’t perform that action at this time.
0 commit comments