Add |wallet reset| command

This commit is contained in:
Michael Vines
2018-07-02 17:08:39 -07:00
committed by Grimes
parent 9ae283dc3a
commit e09b8430ce
4 changed files with 22 additions and 15 deletions

View File

@ -6,7 +6,6 @@
here=$(dirname "$0")
# shellcheck source=multinode-demo/common.sh
source "$here"/common.sh
SOLANA_CONFIG_DIR="$SOLANA_CONFIG_DIR"-client
leader=${1:-${here}/..} # Default to local solana repo
count=${2:-1}
@ -14,11 +13,11 @@ count=${2:-1}
rsync_leader_url=$(rsync_url "$leader")
set -ex
mkdir -p "$SOLANA_CONFIG_DIR"
$rsync -vPz "$rsync_leader_url"/config/leader.json "$SOLANA_CONFIG_DIR"/
$rsync -vPz "$rsync_leader_url"/config-private/mint.json "$SOLANA_CONFIG_DIR"/
mkdir -p "$SOLANA_CONFIG_CLIENT_DIR"
$rsync -vPz "$rsync_leader_url"/config/leader.json "$SOLANA_CONFIG_CLIENT_DIR"/
$rsync -vPz "$rsync_leader_url"/config-private/mint.json "$SOLANA_CONFIG_CLIENT_DIR"/
# shellcheck disable=SC2086 # $solana_client_demo should not be quoted
exec $solana_client_demo \
-n "$count" -l "$SOLANA_CONFIG_DIR"/leader.json \
< "$SOLANA_CONFIG_DIR"/mint.json
-n "$count" -l "$SOLANA_CONFIG_CLIENT_DIR"/leader.json \
< "$SOLANA_CONFIG_CLIENT_DIR"/mint.json