forked from smartbch/smartbch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_with_specific_validator.sh
executable file
·36 lines (28 loc) · 1.08 KB
/
run_with_specific_validator.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
# usage:
# ./run_with_specific_validator.sh validator_address home
set -eux
go build -tags cppbtree -o build/smartbchd ./cmd/smartbchd
# shellcheck disable=SC2088
HOME="~/.smartbchd"
if [ $# -eq 2 ]
then
HOME="$2"
fi
#todo: for test, not production
#rm -rf ~/.smartbchd/
rm -rf "$HOME"
./build/smartbchd init freedomMan --chain-id 0x2711 \
--init-balance=1000000000000000000000000000000 \
--test-keys="37929f578acf92f58f14c5b9cd45ff28c2868c2ba194620238f25d354926a287" \
--home="$HOME"
# shellcheck disable=SC2046
./build/smartbchd add-genesis-validator $(./build/smartbchd generate-genesis-validator \
--validator-address="$1" \
--consensus-pubkey=$(./build/smartbchd generate-consensus-key-info) \
--voting-power=1 \
--staking-coin=1000000000000000000000 \
--introduction="freeman") \
--home="$HOME"
cp ./priv_validator_key.json "$HOME"/config/
#./build/smartbchd start --home="$HOME" --mainnet-url=http://135.181.219.10:8432/ --mainnet-genesis-height=20 --mainnet-user=user --mainnet-password=
./build/smartbchd start --home="$HOME" --mainnet-url=http://127.0.0.1:1234/