Skip to content

Commit

Permalink
Merge pull request #515 from opendansor/patch-1
Browse files Browse the repository at this point in the history
Update localnet.sh to include a flag for fast_blocks for E2E testing
  • Loading branch information
opendansor authored Jun 11, 2024
2 parents 1ad28e4 + c179c8e commit 54d186c
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions scripts/localnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,24 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
# The base directory of the subtensor project
BASE_DIR="$SCRIPT_DIR/.."

: "${CHAIN:=local}"
: "${BUILD_BINARY:=1}"
: "${FEATURES:="pow-faucet runtime-benchmarks fast-blocks"}"
# get parameters
# Get the value of fast_blocks from the first argument
fast_blocks=${1:-"True"}

# Check the value of fast_blocks
if [ "$fast_blocks" == "False" ]; then
# Block of code to execute if fast_blocks is False
echo "fast_blocks is Off"
: "${CHAIN:=local}"
: "${BUILD_BINARY:=1}"
: "${FEATURES:="pow-faucet runtime-benchmarks"}"
else
# Block of code to execute if fast_blocks is not False
echo "fast_blocks is On"
: "${CHAIN:=local}"
: "${BUILD_BINARY:=1}"
: "${FEATURES:="pow-faucet runtime-benchmarks fast-blocks"}"
fi

SPEC_PATH="${SCRIPT_DIR}/specs/"
FULL_PATH="$SPEC_PATH$CHAIN.json"
Expand Down

0 comments on commit 54d186c

Please sign in to comment.