mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16:44 +00:00
fix: entrypoint script for existing setup (#58)
This commit is contained in:
parent
d6f0d34bba
commit
6ebd351534
1 changed files with 225 additions and 220 deletions
|
|
@ -35,6 +35,7 @@ if [ "$GETH_NODE_TYPE" = "signer" ]; then
|
|||
if [ ! -f "$GETH_DATA_DIR/password" ]; then
|
||||
echo -n "$GETH_KEYSTORE_PASSWORD" > "$GETH_DATA_DIR"/password
|
||||
fi
|
||||
|
||||
if [ ! -d "$GETH_KEYSTORE_DIR" ]; then
|
||||
if [ -n "$BLOCK_SIGNER_PRIVATE_KEY" ]; then
|
||||
echo "$GETH_KEYSTORE_DIR missing, running account import"
|
||||
|
|
@ -51,6 +52,9 @@ if [ "$GETH_NODE_TYPE" = "signer" ]; then
|
|||
fi
|
||||
else
|
||||
echo "$GETH_KEYSTORE_DIR exists."
|
||||
if [ -n "$BLOCK_SIGNER_ADDRESS" ]; then
|
||||
echo "Block signer address with 0x prefix: $BLOCK_SIGNER_ADDRESS"
|
||||
else
|
||||
if [ -z "$BLOCK_SIGNER_PRIVATE_KEY" ]; then
|
||||
GETH_ACCOUNT_LIST=$("$GETH_BIN_PATH" --verbosity="$GETH_VERBOSITY" account list --datadir "$GETH_DATA_DIR")
|
||||
BLOCK_SIGNER_ADDRESS_WITHOUT_PREFIX=$(echo "$GETH_ACCOUNT_LIST" | grep -oE '[0-9a-fA-F]{40}$')
|
||||
|
|
@ -58,6 +62,7 @@ if [ "$GETH_NODE_TYPE" = "signer" ]; then
|
|||
echo "Block signer address with 0x prefix: $BLOCK_SIGNER_ADDRESS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Init geth if needed
|
||||
|
|
@ -92,7 +97,6 @@ else
|
|||
fi
|
||||
|
||||
# (Optional) Echo the values for verification
|
||||
|
||||
if [ "$GETH_NODE_TYPE" = "bootnode" ]; then
|
||||
echo "Starting bootnode"
|
||||
echo "$NODE_KEY" > $GETH_DATA_DIR/nodekey
|
||||
|
|
@ -134,7 +138,7 @@ if [ "$GETH_NODE_TYPE" = "bootnode" ]; then
|
|||
--rpc.allow-unprotected-txs \
|
||||
--miner.gasprice=50000000 \
|
||||
--txpool.pricelimit=50000000 \
|
||||
--gpo.maxprice=500000000000 \
|
||||
--gpo.maxprice=500000000000
|
||||
|
||||
elif [ "$GETH_NODE_TYPE" = "signer" ]; then
|
||||
echo "Starting signer node"
|
||||
|
|
@ -238,6 +242,7 @@ elif [ "$GETH_NODE_TYPE" = "member" ]; then
|
|||
--txpool.pricelimit=50000000 \
|
||||
--gpo.maxprice=500000000000 \
|
||||
"$NAT_FLAG"
|
||||
|
||||
elif [ "$GETH_NODE_TYPE" = "archive" ]; then
|
||||
echo "Starting archive node"
|
||||
echo "BOOTNODE_ENDPOINT is set to: $BOOTNODE_ENDPOINT"
|
||||
|
|
|
|||
Loading…
Reference in a new issue