Skip to content

Commit

Permalink
Restore the NODE_ID functionality and use the old data directories
Browse files Browse the repository at this point in the history
  • Loading branch information
zah committed Nov 10, 2020
1 parent 52043a8 commit 500301c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/run-beacon-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ HELP
exit 0
fi

: ${NODE_ID:=0}
: ${DATA_DIR_NAME:="shared_${NETWORK}_${NODE_ID}"}
: ${DATA_DIR:="build/data/${DATA_DIR_NAME}"}
: ${BASE_P2P_PORT:=9000}
: ${BASE_RPC_PORT:=9190}

# Windows detection
if uname | grep -qiE "mingw|msys"; then
Expand Down Expand Up @@ -62,7 +67,12 @@ fi

build/${NBC_BINARY} \
--network=${NETWORK} \
--data-dir=build/data/${NETWORK} \
--data-dir="${DATA_DIR}" \
--log-file="${DATA_DIR}/nbc_bn_$(date +"%Y%m%d%H%M%S").log" \
--web3-url="${WEB3_URL}" \
--tcp-port=$(( ${BASE_P2P_PORT} + ${NODE_ID} )) \
--udp-port=$(( ${BASE_P2P_PORT} + ${NODE_ID} )) \
--rpc \
--rpc-port=$(( ${BASE_RPC_PORT} +${NODE_ID} )) \
$@

0 comments on commit 500301c

Please sign in to comment.