Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require PROTOCOL_VERSION_DEFAULT #655

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ ADD start /
RUN ["chmod", "+x", "start"]

ARG PROTOCOL_VERSION_DEFAULT
RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "PROTOCOL_VERSION_DEFAULT required and not set" && false)
leighmcculloch marked this conversation as resolved.
Show resolved Hide resolved
ENV PROTOCOL_VERSION_DEFAULT $PROTOCOL_VERSION_DEFAULT

ENTRYPOINT ["/start"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ __PHONY__: run logs build build-deps build-deps-core build-deps-horizon build-de

REVISION=$(shell git -c core.abbrev=no describe --always --exclude='*' --long --dirty)
TAG?=dev
PROTOCOL_VERSION_DEFAULT?=
PROTOCOL_VERSION_DEFAULT?=22
XDR_REPO?=https://github.com/stellar/rs-stellar-xdr.git
XDR_REF?=main
CORE_REPO?=https://github.com/stellar/stellar-core.git
Expand Down
5 changes: 0 additions & 5 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,6 @@ function upgrade_local() {
# Wait for server
while ! echo "Stellar-core http server listening!" | nc localhost 11626 &> /dev/null; do sleep 1; done

# Default to latest version supported by core if no default or explicit version was set
if [ -z "$PROTOCOL_VERSION" ]; then
export PROTOCOL_VERSION=`curl -s http://localhost:11626/info | jq -r '.info.protocol_version'`
fi

if [ ".$PROTOCOL_VERSION" == ".none" ] ; then
return
fi
Expand Down
Loading