Skip to content

Commit 691b672

Browse files
authored
Merge pull request #96 from IntersectMBO/bash_imp
fix(scripts): declare arrays with -a and require args
2 parents 35a5e66 + d050c47 commit 691b672

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/cardonnay_scripts/scripts/common/common-start-fast

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,14 @@ register_entities_in_conway() {
410410

411411
echo "Re-registering pools, creating CC members and DReps"
412412

413-
local genesis_signing=()
413+
local -a genesis_signing=()
414414
local skey
415415
for skey in "$STATE_CLUSTER"/shelley/genesis-keys/genesis?.skey; do
416416
[ -e "$skey" ] || { echo "No genesis signing keys found in ${STATE_CLUSTER}/shelley/genesis-keys, line $LINENO in ${BASH_SOURCE[0]}" >&2; exit 1; }
417417
genesis_signing+=("--signing-key-file" "$skey")
418418
done
419419

420-
local delegate_signing=()
420+
local -a delegate_signing=()
421421
for skey in "$STATE_CLUSTER"/shelley/delegate-keys/delegate?.skey; do
422422
[ -e "$skey" ] || { echo "No delegate signing keys found in ${STATE_CLUSTER}/shelley/delegate-keys, line $LINENO in ${BASH_SOURCE[0]}" >&2; exit 1; }
423423
delegate_signing+=("--signing-key-file" "$skey")
@@ -436,8 +436,8 @@ register_entities_in_conway() {
436436

437437
get_txins "$txin_addr" "$stop_txin_amount"
438438

439-
local pool_args=()
440-
local pool_signing=()
439+
local -a pool_args=()
440+
local -a pool_signing=()
441441
local i
442442
for i in $(seq 1 "$NUM_POOLS"); do
443443
pool_args+=( \
@@ -454,21 +454,21 @@ register_entities_in_conway() {
454454
)
455455
done
456456

457-
local cc_args=()
457+
local -a cc_args=()
458458
local f
459459
for f in "$STATE_CLUSTER"/governance_data/cc_member*_committee_hot_auth.cert; do
460460
[ -e "$f" ] || continue
461461
cc_args+=( "--certificate-file" "$f" )
462462
done
463463

464-
local cc_signing=()
464+
local -a cc_signing=()
465465
for f in "$STATE_CLUSTER"/governance_data/cc_member*_committee_cold.skey; do
466466
[ -e "$f" ] || continue
467467
cc_signing+=( "--signing-key-file" "$f" )
468468
done
469469

470-
local dreps_args=()
471-
local dreps_signing=()
470+
local -a dreps_args=()
471+
local -a dreps_signing=()
472472
for i in $(seq 1 "$NUM_DREPS"); do
473473
dreps_args+=( \
474474
"--tx-out" "$(<"${STATE_CLUSTER}/governance_data/vote_stake_addr${i}.addr")+${DREP_DELEGATED}" \

src/cardonnay_scripts/scripts/common/common-start-slow

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,8 @@ submit_gov_action() {
749749

750750
create_and_submit_hf_action() {
751751
local hf_action="${1:?}"
752-
local era="$2"
753-
local major_version="$3"
752+
local era="${2:?}"
753+
local major_version="${3:?}"
754754
local prev_txid="${4:-}"
755755
local prev_index="${5:-0}"
756756

0 commit comments

Comments
 (0)