Make run.sh not overwrite genesis if existing (#7837)

This commit is contained in:
Ryo Onodera 2020-01-16 14:34:36 +09:00 committed by GitHub
parent 4c08184379
commit 78836a9e22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 10 deletions

4
run.sh
View File

@ -77,6 +77,9 @@ else
solana-keygen new --no-passphrase -fso "$leader_storage_account_keypair"
fi
if [[ -e "$ledgerDir"/genesis.bin ]]; then
echo "Use existing genesis"
else
solana-genesis \
--hashes-per-tick sleep \
--faucet-pubkey "$dataDir"/faucet-keypair.json \
@ -87,6 +90,7 @@ solana-genesis \
--bootstrap-storage-pubkey "$dataDir"/leader-storage-account-keypair.json \
--ledger "$ledgerDir" \
--operating-mode development
fi
abort() {
set +e