use ~/.solana instead of PWD to keep cargo happy, don't rsync --append
This commit is contained in:
parent
8b41c415b7
commit
846ad61941
|
@ -51,15 +51,13 @@ rsync_leader_url=$(rsync_url "$leader")
|
|||
)
|
||||
|
||||
iteration=0
|
||||
set -x
|
||||
while true; do
|
||||
(
|
||||
set -x
|
||||
$solana_bench_tps \
|
||||
-n "$count" \
|
||||
-l "$SOLANA_CONFIG_CLIENT_DIR"/leader.json \
|
||||
-k "$SOLANA_CONFIG_CLIENT_DIR"/client.json \
|
||||
"$@"
|
||||
)
|
||||
[[ -n $loop ]] || exit 0
|
||||
iteration=$((iteration + 1))
|
||||
echo ------------------------------------------------------------------------
|
||||
|
|
|
@ -188,10 +188,10 @@ oom_score_adj() {
|
|||
fi
|
||||
}
|
||||
|
||||
SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config
|
||||
SOLANA_CONFIG_PRIVATE_DIR=${SNAP_DATA:-$PWD}/config-private
|
||||
SOLANA_CONFIG_VALIDATOR_DIR=${SNAP_DATA:-$PWD}/config-validator
|
||||
SOLANA_CONFIG_CLIENT_DIR=${SNAP_USER_DATA:-$PWD}/config-client
|
||||
SOLANA_CONFIG_DIR=${SNAP_DATA:-~/.solana}/config
|
||||
SOLANA_CONFIG_PRIVATE_DIR=${SNAP_DATA:-~/.solana}/config-private
|
||||
SOLANA_CONFIG_VALIDATOR_DIR=${SNAP_DATA:-~/.solana}/config-validator
|
||||
SOLANA_CONFIG_CLIENT_DIR=${SNAP_USER_DATA:-~/.solana}/config-client
|
||||
|
||||
rsync_url() { # adds the 'rsync://` prefix to URLs that need it
|
||||
declare url="$1"
|
||||
|
|
|
@ -21,7 +21,7 @@ if [[ -d "$SNAP" ]]; then
|
|||
fi
|
||||
leader="$leader_address"
|
||||
else
|
||||
leader=${1:-${here}/..} # Default to local solana repo
|
||||
leader=${1:-~/.solana} # Default to ~/.solana for data
|
||||
fi
|
||||
|
||||
[[ -f "$SOLANA_CONFIG_PRIVATE_DIR"/mint.json ]] || {
|
||||
|
|
|
@ -43,7 +43,7 @@ if [[ -d $SNAP ]]; then
|
|||
leader=$leader_address
|
||||
else
|
||||
if [[ -z $1 ]]; then
|
||||
leader=${1:-${here}/..} # Default to local solana repo
|
||||
leader=${1:-~/.solana} # Default to ~/.solana for data
|
||||
leader_address=${2:-127.0.0.1} # Default to local leader
|
||||
elif [[ -z $2 ]]; then
|
||||
leader=$1
|
||||
|
@ -94,8 +94,7 @@ rsync_leader_url=$(rsync_url "$leader")
|
|||
tune_networking
|
||||
|
||||
set -ex
|
||||
$rsync --append --verbose --partial --progress --recursive \
|
||||
"$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR"
|
||||
$rsync -vPr "$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR"
|
||||
[[ -d $SOLANA_LEADER_CONFIG_DIR/ledger ]] || {
|
||||
echo "Unable to retrieve ledger from $rsync_leader_url"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue