* purge_old_snapshot_archives is changed to take an extra argument 'maximum_snapshots_to_retain' to control the max number of latest snapshot archives to retain. Note the oldest snapshot is always retained as before and is not subjected to this new options. * The validator and ledger-tool executables are modified with a CLI argument --maximum-snapshots-to-retain. And the options are propagated down the call chains. Their corresponding shell scripts were changed accordingly. * SnapshotConfig is modified to have an extra field for the maximum_snapshots_to_retain * Unit tests are developed to cover purge_old_snapshot_archives
This commit is contained in:
@ -72,6 +72,9 @@ while [[ -n $1 ]]; do
|
||||
elif [[ $1 == --accounts ]]; then
|
||||
args+=("$1" "$2")
|
||||
shift 2
|
||||
elif [[ $1 == --maximum-snapshots-to-retain ]]; then
|
||||
args+=("$1" "$2")
|
||||
shift 2
|
||||
else
|
||||
echo "Unknown argument: $1"
|
||||
$program --help
|
||||
|
@ -119,6 +119,9 @@ while [[ -n $1 ]]; do
|
||||
elif [[ $1 = --snapshot-interval-slots ]]; then
|
||||
args+=("$1" "$2")
|
||||
shift 2
|
||||
elif [[ $1 = --maximum-snapshots-to-retain ]]; then
|
||||
args+=("$1" "$2")
|
||||
shift 2
|
||||
elif [[ $1 = --limit-ledger-size ]]; then
|
||||
args+=("$1" "$2")
|
||||
shift 2
|
||||
|
Reference in New Issue
Block a user