net.sh: Smarter wait slot resolution for --extra-primordial-stakes
This commit is contained in:
parent
cade92d2b4
commit
45d09b33ad
21
net/net.sh
21
net/net.sh
|
@ -874,12 +874,6 @@ while [[ -n $1 ]]; do
|
||||||
shift 1
|
shift 1
|
||||||
elif [[ $1 == --extra-primordial-stakes ]]; then
|
elif [[ $1 == --extra-primordial-stakes ]]; then
|
||||||
extraPrimordialStakes=$2
|
extraPrimordialStakes=$2
|
||||||
# Extra primoridial stakes require that all of the validators start at
|
|
||||||
# the same time. Force async init and wait for supermajority here.
|
|
||||||
waitForNodeInit=false
|
|
||||||
if [[ -z "$maybeWaitForSupermajority" ]]; then
|
|
||||||
maybeWaitForSupermajority="--wait-for-supermajority 1"
|
|
||||||
fi
|
|
||||||
shift 2
|
shift 2
|
||||||
else
|
else
|
||||||
usage "Unknown long option: $1"
|
usage "Unknown long option: $1"
|
||||||
|
@ -1009,6 +1003,21 @@ if [[ -n "$maybeWaitForSupermajority" && -n "$maybeWarpSlot" ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$extraPrimordialStakes" ]]; then
|
||||||
|
# Extra primoridial stakes require that all of the validators start at
|
||||||
|
# the same time. Force async init and wait for supermajority here.
|
||||||
|
waitForNodeInit=false
|
||||||
|
if [[ -z "$maybeWaitForSupermajority" ]]; then
|
||||||
|
waitSlot=
|
||||||
|
if [[ -n "$maybeWarpSlot" ]]; then
|
||||||
|
read -r _ waitSlot <<<"$maybeWarpSlot"
|
||||||
|
else
|
||||||
|
waitSlot=1
|
||||||
|
fi
|
||||||
|
maybeWaitForSupermajority="--wait-for-supermajority $waitSlot"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
checkPremptibleInstances
|
checkPremptibleInstances
|
||||||
|
|
||||||
case $command in
|
case $command in
|
||||||
|
|
Loading…
Reference in New Issue