Plumb --no-snapshot in from CI (#5077)

* Plumb --no-snapshot in from CI
This commit is contained in:
Dan Albert
2019-07-14 13:17:30 -06:00
committed by GitHub
parent 6c49b10784
commit 440d006ec1
4 changed files with 26 additions and 2 deletions

View File

@@ -60,6 +60,8 @@ Operate a configured testnet
- Amount to stake internal nodes in genesis block. If set, airdrops are disabled.
--external-accounts-file FILE_PATH
- A YML file with a list of account pubkeys and corresponding stakes for external nodes
--no-snapshot
- If set, disables booting validators from a snapshot
sanity/start/update-specific options:
-F - Discard validator nodes that didn't bootup successfully
-o noLedgerVerify - Skip ledger verification
@@ -97,6 +99,7 @@ numFullnodesRequested=
externalPrimordialAccountsFile=
remoteExternalPrimordialAccountsFile=
stakeNodesInGenesisBlock=
maybeNoSnapshot=""
command=$1
[[ -n $command ]] || usage
@@ -114,6 +117,9 @@ while [[ -n $1 ]]; do
elif [[ $1 = --lamports ]]; then
genesisOptions="$genesisOptions $1 $2"
shift 2
elif [[ $1 = --no-snapshot ]]; then
maybeNoSnapshot="$1"
shift 1
elif [[ $1 = --deploy-update ]]; then
updatePlatforms="$updatePlatforms $2"
shift 2
@@ -353,6 +359,7 @@ startBootstrapLeader() {
$numBenchTpsClients \"$benchTpsExtraArgs\" \
$numBenchExchangeClients \"$benchExchangeExtraArgs\" \
\"$genesisOptions\" \
$maybeNoSnapshot \
"
) >> "$logFile" 2>&1 || {
cat "$logFile"
@@ -402,6 +409,7 @@ startNode() {
\"$stakeNodesInGenesisBlock\" \
$nodeIndex \
\"$genesisOptions\" \
$maybeNoSnapshot \
"
) >> "$logFile" 2>&1 &
declare pid=$!

View File

@@ -19,6 +19,7 @@ benchTpsExtraArgs="${12}"
numBenchExchangeClients="${13}"
benchExchangeExtraArgs="${14}"
genesisOptions="${15}"
noSnapshot="${16}"
set +x
export RUST_LOG
@@ -170,6 +171,7 @@ local|tar)
args+=(--no-airdrop)
fi
args+=(--init-complete-file "$initCompleteFile")
args+=("$noSnapshot")
nohup ./multinode-demo/validator.sh --bootstrap-leader "${args[@]}" > fullnode.log 2>&1 &
waitForNodeToInit
;;
@@ -247,6 +249,7 @@ local|tar)
fi
args+=(--init-complete-file "$initCompleteFile")
args+=("$noSnapshot")
nohup ./multinode-demo/validator.sh "${args[@]}" > fullnode.log 2>&1 &
waitForNodeToInit
;;
@@ -264,6 +267,7 @@ local|tar)
if [[ $skipSetup != true ]]; then
./multinode-demo/clear-config.sh
fi
args+=("$noSnapshot")
nohup ./multinode-demo/replicator.sh "${args[@]}" > fullnode.log 2>&1 &
sleep 1
;;