Rework validator vote account defaults to half voting fees
This commit is contained in:
@ -80,16 +80,16 @@ if [[ -n ${positional_args[0]} ]]; then
|
||||
fi
|
||||
|
||||
config_dir="$SOLANA_CONFIG_DIR/validator$label"
|
||||
vote_keypair_path="$config_dir"/vote-keypair.json
|
||||
stake_keypair_path="$config_dir"/stake-keypair.json
|
||||
vote_account="$config_dir"/vote-account.json
|
||||
stake_account="$config_dir"/stake-account.json
|
||||
|
||||
if [[ ! -f $vote_keypair_path ]]; then
|
||||
echo "Error: $vote_keypair_path not found"
|
||||
if [[ ! -f $vote_account ]]; then
|
||||
echo "Error: $vote_account not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f $stake_keypair_path ]]; then
|
||||
echo "Error: $stake_keypair_path already exists"
|
||||
if [[ -f $stake_account ]]; then
|
||||
echo "Error: $stake_account already exists"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -97,13 +97,13 @@ if ((airdrops_enabled)); then
|
||||
$solana_cli "${common_args[@]}" airdrop "$stake_sol"
|
||||
fi
|
||||
|
||||
$solana_keygen new --no-passphrase -so "$stake_keypair_path"
|
||||
$solana_keygen new --no-passphrase -so "$stake_account"
|
||||
|
||||
set -x
|
||||
$solana_cli "${common_args[@]}" \
|
||||
vote-account "$vote_keypair_path"
|
||||
vote-account "$vote_account"
|
||||
$solana_cli "${common_args[@]}" \
|
||||
create-stake-account "$stake_keypair_path" "$stake_sol"
|
||||
create-stake-account "$stake_account" "$stake_sol"
|
||||
$solana_cli "${common_args[@]}" \
|
||||
delegate-stake $maybe_force "$stake_keypair_path" "$vote_keypair_path"
|
||||
$solana_cli "${common_args[@]}" stakes "$stake_keypair_path"
|
||||
delegate-stake $maybe_force "$stake_account" "$vote_account"
|
||||
$solana_cli "${common_args[@]}" stakes "$stake_account"
|
||||
|
Reference in New Issue
Block a user