lotus/scripts/snap-lotus-entrypoint.sh

11 lines
360 B
Bash
Raw Normal View History

2024-04-20 07:58:17 +00:00
LOTUS_IMPORT_SNAPSHOT="https://forest-archive.chainsafe.dev/latest/mainnet/"
2021-12-18 01:06:32 +00:00
LOTUS_BINARY=$(dirname "$0")/lotus
GATE="$LOTUS_PATH"/date_initialized
if [ ! -f "$GATE" ]; then
echo importing minimal snapshot
$LOTUS_BINARY daemon --import-snapshot "$LOTUS_IMPORT_SNAPSHOT" --halt-after-import
# Block future inits
date > "$GATE"
fi
$LOTUS_BINARY daemon $ARGS