Add --no-snapshot to disable booting a validator from a snapshot (#5050)
automerge
This commit is contained in:
parent
ebcdc06dc3
commit
9f58318fc5
|
@ -168,6 +168,7 @@ identity_keypair_path=
|
|||
no_restart=0
|
||||
airdrops_enabled=1
|
||||
generate_snapshots=0
|
||||
boot_from_snapshot=1
|
||||
|
||||
positional_args=()
|
||||
while [[ -n $1 ]]; do
|
||||
|
@ -185,6 +186,9 @@ while [[ -n $1 ]]; do
|
|||
elif [[ $1 = --generate-snapshots ]]; then
|
||||
generate_snapshots=1
|
||||
shift
|
||||
elif [[ $1 = --no-snapshot ]]; then
|
||||
boot_from_snapshot=0
|
||||
shift
|
||||
elif [[ $1 = --replicator ]]; then
|
||||
node_type=replicator
|
||||
shift
|
||||
|
@ -422,6 +426,7 @@ EOF
|
|||
done
|
||||
echo "Fetched genesis ledger in $SECONDS seconds"
|
||||
|
||||
if ((boot_from_snapshot)); then
|
||||
SECONDS=
|
||||
echo "Rsyncing state snapshot ${rsync_entrypoint_url:?}..."
|
||||
if ! $rsync -P "${rsync_entrypoint_url:?}"/config/state.tgz .; then
|
||||
|
@ -438,6 +443,7 @@ EOF
|
|||
tar -C "$state_dir" -zxf "$SOLANA_RSYNC_CONFIG_DIR"/state.tgz
|
||||
)
|
||||
echo "Extracted snapshot in $SECONDS seconds"
|
||||
fi
|
||||
)
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue