hive: use HIVE_NETWORK_ID to initialize networkId if available

devp2p/eth simulator is using this HIVE_NETWORK_ID to configure client
This commit is contained in:
jangko 2021-05-20 13:39:44 +07:00
parent b82061bf46
commit 19f343b979
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,7 @@
#
# - [x] HIVE_BOOTNODE enode URL of the remote bootstrap node
# - [x] HIVE_NETWORK_ID network ID number to use for the eth protocol
# - [x] HIVE_CHAIN_ID chain ID is used in transaction signature process
# - [ ] HIVE_TESTNET whether testnet nonces (2^20) are needed
# - [ ] HIVE_NODETYPE sync and pruning selector (archive, full, light)
#
@ -58,6 +59,10 @@ if [ "$HIVE_BOOTNODE" != "" ]; then
FLAGS="$FLAGS --bootnodes:$HIVE_BOOTNODE"
fi
if [ "$HIVE_NETWORK_ID" != "" ]; then
FLAGS="$FLAGS --networkid:$HIVE_NETWORK_ID"
fi
# Configure the genesis chain and use it as start block and dump it to stdout
echo "Supplied genesis state:"
jq -f /mapper.jq /genesis.json | tee /genesis-start.json