solana-genesis: rename tokens to lamports

This commit is contained in:
Michael Vines
2019-03-05 17:01:57 -08:00
parent f1d1852691
commit beb45f44ac
4 changed files with 20 additions and 20 deletions

View File

@ -191,15 +191,15 @@ if [[ ! -d "$ledger_config_dir" ]]; then
$solana_wallet --keypair "$fullnode_id_path" address
# A fullnode requires 3 tokens to function:
# A fullnode requires 3 lamports to function:
# - one token to create an instance of the vote_program with
# - one token for the transaction fee
# - one token to keep the node identity public key valid.
retries=5
while true; do
# TODO: Until https://github.com/solana-labs/solana/issues/2355 is resolved
# a fullnode needs N tokens as its vote account gets re-created on every
# node restart, costing it tokens
# a fullnode needs N lamports as its vote account gets re-created on every
# node restart, costing it lamports
if $solana_wallet --keypair "$fullnode_id_path" --host "${leader_address%:*}" airdrop 1000000; then
break
fi

View File

@ -14,11 +14,11 @@ usage () {
echo "Error: $*"
fi
cat <<EOF
usage: $0 [-n num_tokens] [-l] [-p] [-t node_type]
usage: $0 [-n lamports] [-l] [-p] [-t node_type]
Creates a fullnode configuration
-n num_tokens - Number of tokens to create
-n lamports - Number of lamports to create
-t node_type - Create configuration files only for this kind of node. Valid
options are bootstrap-leader or fullnode. Creates configuration files
for both by default
@ -27,7 +27,7 @@ EOF
exit $exitcode
}
num_tokens=1000000000
lamports=1000000000
bootstrap_leader=true
fullnode=true
while getopts "h?n:lpt:" opt; do
@ -37,7 +37,7 @@ while getopts "h?n:lpt:" opt; do
exit 0
;;
n)
num_tokens="$OPTARG"
lamports="$OPTARG"
;;
t)
node_type="$OPTARG"
@ -80,7 +80,7 @@ if $bootstrap_leader; then
--bootstrap-leader-keypair "$SOLANA_CONFIG_DIR"/bootstrap-leader-id.json \
--ledger "$SOLANA_RSYNC_CONFIG_DIR"/ledger \
--mint "$SOLANA_CONFIG_DIR"/mint-id.json \
--num_tokens "$num_tokens"
--lamports "$lamports"
cp -a "$SOLANA_RSYNC_CONFIG_DIR"/ledger "$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger
)
fi