From a8ec380c562b8251c46935f654c873c6b237349e Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Fri, 3 Sep 2021 12:44:55 -0700 Subject: [PATCH] Rework authorized_withdrawer usage (cherry picked from commit fa61b9079685bcabbf6a5f862f16209a68044f53) --- multinode-demo/validator.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/multinode-demo/validator.sh b/multinode-demo/validator.sh index ade5eb6fc4..b1c7f1638d 100755 --- a/multinode-demo/validator.sh +++ b/multinode-demo/validator.sh @@ -201,7 +201,7 @@ if [[ -n $REQUIRE_KEYPAIRS ]]; then if [[ -z $vote_account ]]; then usage "Error: --vote-account not specified" fi - if [[ -z $authorized_withdrawer_pubkey ]]; then + if [[ -z $authorized_withdrawer ]]; then usage "Error: --authorized_withdrawer not specified" fi fi @@ -231,6 +231,7 @@ faucet_address="${gossip_entrypoint%:*}":9900 : "${identity:=$ledger_dir/identity.json}" : "${vote_account:=$ledger_dir/vote-account.json}" +: "${authorized_withdrawer:=$ledger_dir/authorized-withdrawer.json}" default_arg --entrypoint "$gossip_entrypoint" if ((airdrops_enabled)); then @@ -315,13 +316,7 @@ rpc_url=$($solana_gossip rpc-url --timeout 180 --entrypoint "$gossip_entrypoint" [[ -r "$identity" ]] || $solana_keygen new --no-passphrase -so "$identity" [[ -r "$vote_account" ]] || $solana_keygen new --no-passphrase -so "$vote_account" -if [ -z "$authorized_withdrawer_pubkey" ]; then - authorized_withdrawer_file=$ledger_dir/authorized-withdrawer.json - [[ -r "$authorized_withdrawer_file" ]] || $solana_keygen new --no-passphrase -so "$authorized_withdrawer_file"; - authorized_withdrawer=$authorized_withdrawer_file -else - authorized_withdrawer=$authorized_withdrawer_pubkey -fi +[[ -r "$authorized_withdrawer" ]] || $solana_keygen new --no-passphrase -so "$authorized_withdrawer" setup_validator_accounts "$node_sol"