Avoid resetting genesis time in a lighthouse node on restart

This commit is contained in:
Prathamesh Musale 2023-04-14 15:04:51 +05:30
parent 71cce4233c
commit 612b6be676

View File

@ -25,8 +25,12 @@ else
cd /opt/testnet/cl
if [ -z "$LIGHTHOUSE_GENESIS_STATE_URL" ]; then
# TODO Avoid on a restart
./reset_genesis_time.sh
# Check if beacon node data exists to avoid resetting genesis time on a restart
if [ -d /opt/testnet/build/cl/node_"$NODE_NUMBER"/beacon ]; then
echo "Skipping genesis time reset"
else
./reset_genesis_time.sh
fi
else
while [ 1 -eq 1 ]; do
echo "Waiting on Genesis time ..."