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

Update localnet.sh to include a flag for fast_blocks for E2E testing #515

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
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
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