Skip to content

Commit

Permalink
Refrain from trying to configure a staking account that was previousl…
Browse files Browse the repository at this point in the history
…y configured
  • Loading branch information
mvines committed Mar 22, 2019
1 parent 6a19046 commit e189c42
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions multinode-demo/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ setup_fullnode_staking() {
declare staker_id
staker_id=$($solana_wallet --keypair "$staker_id_path" address)

if [[ -f "$staker_id_path".configured ]]; then
echo "Staking account has already been configured"
return 0
fi

# A fullnode requires 43 lamports to function:
# - one lamport to keep the node identity public key valid. TODO: really??
# - 42 more for the staker account we fund
Expand All @@ -169,6 +174,8 @@ setup_fullnode_staking() {
--delegate-account "$fullnode_id" \
--authorize-voter "$staker_id" || return $?


touch "$staker_id_path".configured
return 0
}

Expand Down

0 comments on commit e189c42

Please sign in to comment.