Skip to content

Commit 54d186c

Browse files
author
opendansor
authored
Merge pull request #515 from opendansor/patch-1
Update localnet.sh to include a flag for fast_blocks for E2E testing
2 parents 1ad28e4 + c179c8e commit 54d186c

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

scripts/localnet.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,24 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
66
# The base directory of the subtensor project
77
BASE_DIR="$SCRIPT_DIR/.."
88

9-
: "${CHAIN:=local}"
10-
: "${BUILD_BINARY:=1}"
11-
: "${FEATURES:="pow-faucet runtime-benchmarks fast-blocks"}"
9+
# get parameters
10+
# Get the value of fast_blocks from the first argument
11+
fast_blocks=${1:-"True"}
12+
13+
# Check the value of fast_blocks
14+
if [ "$fast_blocks" == "False" ]; then
15+
# Block of code to execute if fast_blocks is False
16+
echo "fast_blocks is Off"
17+
: "${CHAIN:=local}"
18+
: "${BUILD_BINARY:=1}"
19+
: "${FEATURES:="pow-faucet runtime-benchmarks"}"
20+
else
21+
# Block of code to execute if fast_blocks is not False
22+
echo "fast_blocks is On"
23+
: "${CHAIN:=local}"
24+
: "${BUILD_BINARY:=1}"
25+
: "${FEATURES:="pow-faucet runtime-benchmarks fast-blocks"}"
26+
fi
1227

1328
SPEC_PATH="${SCRIPT_DIR}/specs/"
1429
FULL_PATH="$SPEC_PATH$CHAIN.json"

0 commit comments

Comments
 (0)