diff --git a/scripts/cnode-helper-scripts/cncli.sh b/scripts/cnode-helper-scripts/cncli.sh index 2c9d61d98..eab135914 100755 --- a/scripts/cnode-helper-scripts/cncli.sh +++ b/scripts/cnode-helper-scripts/cncli.sh @@ -181,7 +181,7 @@ cncliInit() { [[ ! -f "${CNCLI}" ]] && echo -e "\nERROR: failed to locate cncli executable, please install with 'prereqs.sh'\n" && exit 1 CNCLI_VERSION="v$(cncli -V | cut -d' ' -f2)" - if ! versionCheck "2.1.0" "${CNCLI_VERSION}"; then echo "ERROR: cncli ${CNCLI_VERSION} installed, minimum required version is 2.1.0, please upgrade to latest version!"; exit 1; fi + if ! versionCheck "5.1.0" "${CNCLI_VERSION}"; then echo "ERROR: cncli ${CNCLI_VERSION} installed, minimum required version is 5.1.0, please upgrade to latest version!"; exit 1; fi [[ -z "${CNCLI_DIR}" ]] && CNCLI_DIR="${CNODE_HOME}/guild-db/cncli" if ! mkdir -p "${CNCLI_DIR}" 2>/dev/null; then echo "ERROR: Failed to create CNCLI DB directory: ${CNCLI_DIR}"; exit 1; fi @@ -209,7 +209,7 @@ cncliInit() { ################################# cncliSync() { - ${CNCLI} sync --host "${CNODE_HOST}" --network-magic "${NWMAGIC}" --port "${CNODE_PORT}" --db "${CNCLI_DB}" + ${CNCLI} sync --host "${CNODE_HOST}" --network-magic "${NWMAGIC}" --port "${CNODE_PORT}" --db "${CNCLI_DB}" --shelley-genesis-hash "${GENESIS_HASH}" } ################################# diff --git a/scripts/cnode-helper-scripts/env b/scripts/cnode-helper-scripts/env index dee2fe2a9..d7434d083 100644 --- a/scripts/cnode-helper-scripts/env +++ b/scripts/cnode-helper-scripts/env @@ -899,6 +899,7 @@ else [[ ! -f "${ALONZO_GENESIS_JSON}" ]] && echo "Byron genesis file not found: ${ALONZO_GENESIS_JSON}" && return 1 [[ ! -f "${BYRON_GENESIS_JSON}" ]] && echo "Byron genesis file not found: ${BYRON_GENESIS_JSON}" && return 1 [[ ! -f "${GENESIS_JSON}" ]] && echo "Shelley genesis file not found: ${GENESIS_JSON}" && return 1 + GENESIS_HASH="$(${CCLI} genesis hash --genesis "${GENESIS_JSON}")" PROTOCOL="${CONFIG_CONTENTS[3]}" P2P_ENABLED="${CONFIG_CONTENTS[5]}" fi