Skip to content

Commit

Permalink
Require PROTOCOL_VERSION_DEFAULT (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored Dec 17, 2024
1 parent 8ba15a3 commit 65efdfc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
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 "Image build arg PROTOCOL_VERSION_DEFAULT required and not set" && false)
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

0 comments on commit 65efdfc

Please sign in to comment.