File tree Expand file tree Collapse file tree 1 file changed +44
-37
lines changed Expand file tree Collapse file tree 1 file changed +44
-37
lines changed Original file line number Diff line number Diff line change 2
2
3
3
# Check if `--no-purge` passed as a parameter
4
4
NO_PURGE=0
5
+
6
+ # Check if `--build-only` passed as parameter
7
+ BUILD_ONLY=0
8
+
5
9
for arg in " $@ " ; do
6
10
if [ " $arg " = " --no-purge" ]; then
7
11
NO_PURGE=1
8
- break
12
+ elif [ " $arg " = " --build-only" ]; then
13
+ BUILD_ONLY=1
9
14
fi
10
15
done
11
16
72
77
echo " *** Previous chainstate purged"
73
78
fi
74
79
75
- echo " *** Starting localnet nodes..."
76
- alice_start=(
77
- " $BUILD_DIR /release/node-subtensor"
78
- --base-path /tmp/alice
79
- --chain=" $FULL_PATH "
80
- --alice
81
- --port 30334
82
- --rpc-port 9944
83
- --validator
84
- --rpc-cors=all
85
- --allow-private-ipv4
86
- --discover-local
87
- --unsafe-force-node-key-generation
88
- )
89
-
90
- bob_start=(
91
- " $BUILD_DIR /release/node-subtensor"
92
- --base-path /tmp/bob
93
- --chain=" $FULL_PATH "
94
- --bob
95
- --port 30335
96
- --rpc-port 9945
97
- --validator
98
- --rpc-cors=all
99
- --allow-private-ipv4
100
- --discover-local
101
- --unsafe-force-node-key-generation
102
- )
103
-
104
- trap ' pkill -P $$' EXIT SIGINT SIGTERM
105
-
106
- (
107
- (" ${alice_start[@]} " 2>&1 ) &
108
- (" ${bob_start[@]} " 2>&1 )
109
- wait
110
- )
80
+ if [ $BUILD_ONLY -eq 0 ]; then
81
+ echo " *** Starting localnet nodes..."
82
+ alice_start=(
83
+ " $BUILD_DIR /release/node-subtensor"
84
+ --base-path /tmp/alice
85
+ --chain=" $FULL_PATH "
86
+ --alice
87
+ --port 30334
88
+ --rpc-port 9944
89
+ --validator
90
+ --rpc-cors=all
91
+ --allow-private-ipv4
92
+ --discover-local
93
+ --unsafe-force-node-key-generation
94
+ )
95
+
96
+ bob_start=(
97
+ " $BUILD_DIR /release/node-subtensor"
98
+ --base-path /tmp/bob
99
+ --chain=" $FULL_PATH "
100
+ --bob
101
+ --port 30335
102
+ --rpc-port 9945
103
+ --validator
104
+ --rpc-cors=all
105
+ --allow-private-ipv4
106
+ --discover-local
107
+ --unsafe-force-node-key-generation
108
+ )
109
+
110
+ trap ' pkill -P $$' EXIT SIGINT SIGTERM
111
+
112
+ (
113
+ (" ${alice_start[@]} " 2>&1 ) &
114
+ (" ${bob_start[@]} " 2>&1 )
115
+ wait
116
+ )
117
+ fi
You can’t perform that action at this time.
0 commit comments