diff --git a/scripts/localnet.sh b/scripts/localnet.sh index 1e9618954..cb702f38e 100755 --- a/scripts/localnet.sh +++ b/scripts/localnet.sh @@ -48,30 +48,30 @@ fi if [[ $BUILD_BINARY == "1" ]]; then echo "*** Building substrate binary..." - cargo build --workspace --profile=release --features "$FEATURES" --manifest-path "$BASE_DIR/Cargo.toml" + cargo build --workspace --profile="${CARGO_PROFILE:-release}" --features "$FEATURES" --manifest-path "$BASE_DIR/Cargo.toml" echo "*** Binary compiled" fi echo "*** Building chainspec..." -"$BASE_DIR/target/release/node-subtensor" build-spec --disable-default-bootnode --raw --chain $CHAIN >$FULL_PATH +"$BASE_DIR/target/${CARGO_PROFILE:-release}/node-subtensor" build-spec --disable-default-bootnode --raw --chain $CHAIN >$FULL_PATH echo "*** Chainspec built and output to file" # generate node keys -$BASE_DIR/target/release/node-subtensor key generate-node-key --chain="$FULL_PATH" --base-path /tmp/alice -$BASE_DIR/target/release/node-subtensor key generate-node-key --chain="$FULL_PATH" --base-path /tmp/bob +"$BASE_DIR/target/${CARGO_PROFILE:-release}/node-subtensor" key generate-node-key --chain="$FULL_PATH" --base-path /tmp/alice +"$BASE_DIR/target/${CARGO_PROFILE:-release}/node-subtensor" key generate-node-key --chain="$FULL_PATH" --base-path /tmp/bob if [ $NO_PURGE -eq 1 ]; then echo "*** Purging previous state skipped..." else echo "*** Purging previous state..." - "$BASE_DIR/target/release/node-subtensor" purge-chain -y --base-path /tmp/bob --chain="$FULL_PATH" >/dev/null 2>&1 - "$BASE_DIR/target/release/node-subtensor" purge-chain -y --base-path /tmp/alice --chain="$FULL_PATH" >/dev/null 2>&1 + "$BASE_DIR/target/${CARGO_PROFILE:-release}/node-subtensor" purge-chain -y --base-path /tmp/bob --chain="$FULL_PATH" >/dev/null 2>&1 + "$BASE_DIR/target/${CARGO_PROFILE:-release}/node-subtensor" purge-chain -y --base-path /tmp/alice --chain="$FULL_PATH" >/dev/null 2>&1 echo "*** Previous chainstate purged" fi echo "*** Starting localnet nodes..." alice_start=( - "$BASE_DIR/target/release/node-subtensor" + "$BASE_DIR/target/${CARGO_PROFILE:-release}/node-subtensor" --base-path /tmp/alice --chain="$FULL_PATH" --alice @@ -85,7 +85,7 @@ alice_start=( ) bob_start=( - "$BASE_DIR"/target/release/node-subtensor + "$BASE_DIR/target/${CARGO_PROFILE:-release}/node-subtensor" --base-path /tmp/bob --chain="$FULL_PATH" --bob