Skip to content

Commit 65efdfc

Browse files
Require PROTOCOL_VERSION_DEFAULT (#655)
1 parent 8ba15a3 commit 65efdfc

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ ADD start /
5353
RUN ["chmod", "+x", "start"]
5454

5555
ARG PROTOCOL_VERSION_DEFAULT
56+
RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "Image build arg PROTOCOL_VERSION_DEFAULT required and not set" && false)
5657
ENV PROTOCOL_VERSION_DEFAULT $PROTOCOL_VERSION_DEFAULT
5758

5859
ENTRYPOINT ["/start"]

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ __PHONY__: run logs build build-deps build-deps-core build-deps-horizon build-de
22

33
REVISION=$(shell git -c core.abbrev=no describe --always --exclude='*' --long --dirty)
44
TAG?=dev
5-
PROTOCOL_VERSION_DEFAULT?=
5+
PROTOCOL_VERSION_DEFAULT?=22
66
XDR_REPO?=https://github.com/stellar/rs-stellar-xdr.git
77
XDR_REF?=main
88
CORE_REPO?=https://github.com/stellar/stellar-core.git

start

-5
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,6 @@ function upgrade_local() {
531531
# Wait for server
532532
while ! echo "Stellar-core http server listening!" | nc localhost 11626 &> /dev/null; do sleep 1; done
533533

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

0 commit comments

Comments
 (0)