Skip to content

Commit 4926784

Browse files
committed
fix(cmd/testnetify): pass config by pointer
Signed-off-by: Artur Troian <[email protected]>
1 parent eba5456 commit 4926784

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

app/testnet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type TestnetConfig struct {
6969
func InitAkashAppForTestnet(
7070
app *AkashApp,
7171
db dbm.DB,
72-
tcfg TestnetConfig,
72+
tcfg *TestnetConfig,
7373
) *AkashApp {
7474
//
7575
// Required Changes:

cmd/akash/cmd/app_creator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (a appCreator) newTestnetApp(logger log.Logger, db dbm.DB, traceStore io.Wr
150150
panic("app created from newApp is not of type AkashApp")
151151
}
152152

153-
tcfg, valid := appOpts.Get(cflags.KeyTestnetConfig).(akash.TestnetConfig)
153+
tcfg, valid := appOpts.Get(cflags.KeyTestnetConfig).(*akash.TestnetConfig)
154154
if !valid {
155155
panic("cflags.KeyTestnetConfig is not of type akash.TestnetConfig")
156156
}

script/upgrades.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,13 @@ trap_show() {
169169
}
170170

171171
function cleanup() {
172-
jb=$(jobs -p)
173-
174-
if [[ "$jb" != "" ]]; then
172+
while IFS= read -r pid; do
175173
# shellcheck disable=SC2086
176-
kill $jb
177-
fi
174+
kill $pid
175+
done < <(jobs -p)
178176
}
179177

180-
trap_add EXIT 'cleanup'
178+
#trap_add EXIT 'cleanup'
181179

182180
pushd() {
183181
command pushd "$@" >/dev/null
@@ -365,7 +363,7 @@ function init() {
365363
genesis_file=${valdir}/config/genesis.json
366364
rm -f "$genesis_file"
367365

368-
$AKASH init --home "$valdir" "$(jq -rc '.moniker' <<<"$val")" >/dev/null 2>&1
366+
$AKASH genesis init --home "$valdir" "$(jq -rc '.moniker' <<<"$val")" >/dev/null 2>&1
369367

370368
cat >"$valdir/.envrc" <<EOL
371369
PATH_add "\$(pwd)/cosmovisor/current/bin"

0 commit comments

Comments
 (0)