forked from xz-cn/nft_parachain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-testnet.sh
executable file
·55 lines (50 loc) · 1.18 KB
/
run-testnet.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# ls -la /nft_parachain/target/release
# /usr/local/bin/nft --dev --ws-external --rpc-external --base-path=/chain-data -lwarn,runtime
echo Running node $NODE
echo P2P Port : $P2PPORT
echo WebSocket Port : $WSPORT
echo RPC Port : $RPCPORT
echo Boot = $BOOTNODE
echo Validator = $VALIDATOR
if [ "$BOOTNODE" = True ];
then
echo This is a Bootnode;
BOOTNODES="";
NODEKEY="--node-key-file einstein_key_file";
else
echo Bootnode Port : $BOOTPORT;
echo Bootnode PeerID : $BOOTID;
BOOTNODES="--bootnodes /dns4/node_einstein/tcp/$BOOTPORT/p2p/$BOOTID";
NODEKEY="";
fi
if [ "$VALIDATOR" = True ];
then
echo This is a Validator node;
/usr/local/bin/nft \
--base-path /chain-data \
--chain ./nftTestnetSpecRaw.json \
--port $P2PPORT \
--ws-port $WSPORT \
--rpc-port $RPCPORT \
--validator \
--rpc-methods=Unsafe \
--name $NODE \
--ws-external \
--rpc-external \
-lruntime \
$BOOTNODES \
$NODEKEY;
else
echo This is a Gateway node;
/usr/local/bin/nft \
--base-path /chain-data \
--chain ./nftTestnetSpecRaw.json \
--port $P2PPORT \
--ws-port $WSPORT \
--rpc-port $RPCPORT \
--name $NODE \
--ws-external \
--rpc-cors all \
-lruntime \
$BOOTNODES;
fi