Add support for archive node
This commit is contained in:
@@ -19,8 +19,14 @@ fi
|
||||
# Init genesis state if geth sub dir does not exist
|
||||
GETH_DIR=${DATA_DIR}/geth
|
||||
if [ ! -d "$GETH_DIR" ]; then
|
||||
STATE_SCHEME_OPTS=""
|
||||
if [ "$CERC_GETH_GCMODE" = "archive" ]; then
|
||||
# Archive mode only works with state.scheme set to hash
|
||||
STATE_SCHEME_OPTS="--state.scheme=hash"
|
||||
fi
|
||||
|
||||
echo Initializing geth...
|
||||
geth --datadir ${DATA_DIR} init ${BSC_GENESIS}
|
||||
geth --datadir ${DATA_DIR} ${STATE_SCHEME_OPTS} init ${BSC_GENESIS}
|
||||
echo Initialization done
|
||||
fi
|
||||
|
||||
@@ -37,4 +43,8 @@ exec "geth" \
|
||||
--ws.addr="0.0.0.0" \
|
||||
--ws.port 8546 \
|
||||
--ws.origins="*" \
|
||||
--gcmode=${CERC_GETH_GCMODE} \
|
||||
--verbosity=${CERC_GETH_VERBOSITY} \
|
||||
--metrics \
|
||||
--metrics.addr="0.0.0.0" \
|
||||
"$@"
|
||||
|
||||
Reference in New Issue
Block a user