File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
2+
3+ # Restore nodekey from secret before XDC init runs, so init does not generate a new one.
4+ if [ -n " $NODE_KEY " ] && [ ! -f /work/xdcchain/XDC/nodekey ]; then
5+ mkdir -p /work/xdcchain/XDC
6+ echo " $NODE_KEY " > /work/xdcchain/XDC/nodekey
7+ echo " Restored nodekey from NODE_KEY secret."
8+ fi
9+
210if [ ! -d /work/xdcchain/XDC/chaindata ]
311then
412 if test -z " $PRIVATE_KEY "
118126echo " Running a node with wallet: ${wallet} at IP: ${instance_ip} "
119127echo " Starting nodes with $bootnodes ..."
120128
129+ config_arg=" "
130+ if [ -f /work/config.toml ]; then
131+ echo " config.toml found, using static peers from --config /work/config.toml"
132+ config_arg=" --config /work/config.toml"
133+ fi
134+
121135# Note: --gcmode=archive means node will store all historical data. This will lead to high memory usage. But sync mode require archive to sync
122136# https://github.com/XinFinOrg/XDPoSChain/issues/268
123137
124- XDC --ethstats ${netstats} \
138+ XDC ${config_arg} --ethstats ${netstats} \
125139--gcmode ${gc_mode} --syncmode ${sync_mode} \
126140--nat extip:${instance_ip} \
127141--bootnodes ${bootnodes} \
You can’t perform that action at this time.
0 commit comments