Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ type TestnetConfig struct {
func InitAkashAppForTestnet(
app *AkashApp,
db dbm.DB,
tcfg TestnetConfig,
tcfg *TestnetConfig,
) *AkashApp {
//
// Required Changes:
//

if tcfg == nil {
tmos.Exit("TestnetConfig cannot be nil")
}

var err error

defer func() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/akash/cmd/app_creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ func (a appCreator) newTestnetApp(logger log.Logger, db dbm.DB, traceStore io.Wr
panic("app created from newApp is not of type AkashApp")
}

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

// Make modifications to the normal AkashApp required to run the network locally
Expand Down
10 changes: 4 additions & 6 deletions script/upgrades.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,10 @@ trap_show() {
}

function cleanup() {
jb=$(jobs -p)

if [[ "$jb" != "" ]]; then
while IFS= read -r pid; do
# shellcheck disable=SC2086
kill $jb
fi
kill $pid
done < <(jobs -p)
}

trap_add EXIT 'cleanup'
Expand Down Expand Up @@ -365,7 +363,7 @@ function init() {
genesis_file=${valdir}/config/genesis.json
rm -f "$genesis_file"

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

cat >"$valdir/.envrc" <<EOL
PATH_add "\$(pwd)/cosmovisor/current/bin"
Expand Down
Loading