mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
fix private devnet with private ip (#879)
Co-authored-by: liam.lai <liam.lai@us>
This commit is contained in:
parent
86e3dbb04d
commit
6217d1e3fb
1 changed files with 13 additions and 5 deletions
|
|
@ -62,24 +62,32 @@ fi
|
|||
ws_port=8555
|
||||
if test -z "$WS_PORT"
|
||||
then
|
||||
echo "WS_PORT not set, default to $ws_port"
|
||||
echo "WS_PORT not set, default to $ws_port"
|
||||
else
|
||||
echo "WS_PORT found, set to $WS_PORT"
|
||||
ws_port=$WS_PORT
|
||||
fi
|
||||
|
||||
INSTANCE_IP=$(curl https://checkip.amazonaws.com)
|
||||
netstats="${NODE_NAME}-${wallet}-${INSTANCE_IP}:xinfin_xdpos_hybrid_network_stats@devnetstats.hashlabs.apothem.network:1999"
|
||||
instance_ip=$(ifconfig eth0 | awk '/inet addr:/ {print $2}' | cut -d: -f2)
|
||||
if test -z "$INSTANCE_IP"
|
||||
then
|
||||
echo "INSTANCE_IP not set, default to $instance_ip"
|
||||
else
|
||||
echo "INSTANCE_IP found, set to $INSTANCE_IP"
|
||||
instance_ip=$INSTANCE_IP
|
||||
fi
|
||||
|
||||
netstats="${NODE_NAME}-${wallet}-${instance_ip}:xinfin_xdpos_hybrid_network_stats@devnetstats.hashlabs.apothem.network:1999"
|
||||
|
||||
|
||||
echo "Running a node with wallet: ${wallet} at IP: ${INSTANCE_IP}"
|
||||
echo "Running a node with wallet: ${wallet} at IP: ${instance_ip}"
|
||||
echo "Starting nodes with $bootnodes ..."
|
||||
|
||||
# Note: --gcmode=archive means node will store all historical data. This will lead to high memory usage. But sync mode require archive to sync
|
||||
# https://github.com/XinFinOrg/XDPoSChain/issues/268
|
||||
|
||||
XDC --ethstats ${netstats} --gcmode archive \
|
||||
--nat extip:${INSTANCE_IP} \
|
||||
--nat extip:${instance_ip} \
|
||||
--bootnodes ${bootnodes} --syncmode full \
|
||||
--datadir /work/xdcchain --networkid 551 \
|
||||
--port $port --http --http-corsdomain "*" --http-addr 0.0.0.0 \
|
||||
|
|
|
|||
Loading…
Reference in a new issue