-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
64 lines (60 loc) · 1.47 KB
/
start.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
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -u
set -e
function usage() {
echo ""
echo "Usage:"
echo " $0 [raft | istanbul | clique] [tessera | constellation] [--tesseraOptions \"options for Tessera start script\"]"
echo ""
echo "Where:"
echo " raft | istanbul | clique : specifies which consensus algorithm to use"
echo " tessera | constellation (default = constellation): specifies which privacy implementation to use"
echo " --tesseraOptions: allows additional options as documented in tessera-start.sh usage which is shown below:"
echo ""
./tessera-start.sh --help
exit -1
}
privacyImpl=constellation
tesseraOptions=
consensus=
while (( "$#" )); do
case "$1" in
raft)
consensus=raft
shift
;;
istanbul)
consensus=istanbul
shift
;;
clique)
consensus=clique
shift
;;
tessera)
privacyImpl=tessera
shift
;;
constellation)
privacyImpl=constellation
shift
;;
--tesseraOptions)
tesseraOptions=$2
shift 2
;;
--help)
shift
usage
;;
*)
echo "Error: Unsupported command line parameter $1"
usage
;;
esac
done
if [ "$consensus" == "" ]; then
echo "Error: consensus not selected"
exit 1
fi
./$consensus-start.sh $privacyImpl $tesseraOptions