mirror of https://github.com/hyperledger/besu
An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
675 B
24 lines
675 B
6 years ago
|
#!/bin/sh -e
|
||
|
|
||
|
# write pub key for checking that network works
|
||
|
node_id=`hostname`
|
||
|
|
||
|
/opt/pantheon/bin/pantheon $@ export-pub-key "/opt/pantheon/public-keys/${node_id}"
|
||
|
|
||
|
BOOTNODE_KEY_FILE=/opt/pantheon/public-keys/bootnode
|
||
|
|
||
|
# sleep loop to wait for the public key file to be written
|
||
|
while [ ! -f $BOOTNODE_KEY_FILE ]
|
||
|
do
|
||
|
sleep 1
|
||
|
done
|
||
|
|
||
|
# get bootnode enode address
|
||
|
bootnode_pubkey=`sed 's/^0x//' $BOOTNODE_KEY_FILE`
|
||
|
boonode_ip=`getent hosts bootnode | awk '{ print $1 }'`
|
||
|
BOOTNODE_P2P_PORT="30303"
|
||
|
|
||
|
bootnode_enode_address="enode://${bootnode_pubkey}@${boonode_ip}:${BOOTNODE_P2P_PORT}"
|
||
|
|
||
|
# run with bootnode param
|
||
|
/opt/pantheon/bin/pantheon $@ --bootnodes=$bootnode_enode_address
|