File tree Expand file tree Collapse file tree 2 files changed +224
-176
lines changed Expand file tree Collapse file tree 2 files changed +224
-176
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,17 @@ if [[ ! -f "$1" ]]; then
1414 exit 1
1515fi
1616
17- CLIENT_CMD_OUTPUT=$( cat " $1 " )
18- INCLUDE_ANCILLARY=" $2 "
17+ CLIENT_CMD_OUTPUT=$( cat " $1 " ) ; shift
18+ INCLUDE_ANCILLARY=" false"
19+ LEDGER_BACKEND=" in-memory"
20+
21+ while [[ " $# " -gt 0 ]]; do
22+ case $1 in
23+ --include-ancillary) INCLUDE_ANCILLARY=" true" ;;
24+ --ledger-backend) LEDGER_BACKEND=" $2 " ; shift ;;
25+ esac
26+ shift
27+ done
1928
2029DOCKER_CMD=$( echo " $CLIENT_CMD_OUTPUT " | grep -E ' ^\s*docker run' )
2130if [[ -z " $DOCKER_CMD " ]]; then
2635echo " Extracted Docker command:"
2736echo " $DOCKER_CMD "
2837
38+ # Note: ledger conversion to lmdb can only be executed if ancillary files are included
39+ if [[ ${LEDGER_BACKEND,,} == " lmdb" && " $INCLUDE_ANCILLARY " == " true" ]]; then
40+ DOCKER_CMD=" ${DOCKER_CMD/ ghcr/ " -e CARDANO_CONFIG_JSON_MERGE='{\" LedgerDB\" :{\" Backend\" :\" V1LMDB\" }}' ghcr" } "
41+ fi
42+
2943DOCKER_CMD_DETACHED=" ${DOCKER_CMD/ docker run/ docker run -d} "
3044echo " Running Docker command in detached mode:"
3145echo " $DOCKER_CMD_DETACHED "
5872 exit 1
5973fi
6074
61- if [[ " $INCLUDE_ANCILLARY " == " --include-ancillary " ]]; then
75+ if [[ " $INCLUDE_ANCILLARY " == " true " ]]; then
6276 echo " Parameter '--include-ancillary' is set."
6377 if wait_for_log " $CONTAINER_ID " 30 " Chain extended, new tip" ; then
6478 echo " ✅ The Cardano node started successfully from the Mithril snapshot with the ancillary files."
You can’t perform that action at this time.
0 commit comments