@@ -37,7 +37,6 @@ import (
37
37
sdk "github.com/cosmos/cosmos-sdk/types"
38
38
"github.com/cosmos/cosmos-sdk/types/tx/signing"
39
39
authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config"
40
- "github.com/cosmos/ibc-go/v8/testing/simapp"
41
40
)
42
41
43
42
const (
@@ -47,7 +46,9 @@ const (
47
46
// NewRootCmd creates a new root command for simd. It is called once in the
48
47
// main function.
49
48
func NewRootCmd () (rootCMD * cobra.Command , params params.EncodingConfig ) {
50
- tempApp := app .NewOdinApp (log .NewNopLogger (), dbm .NewMemDB (), nil , true , map [int64 ]bool {}, simtestutil .NewAppOptionsWithFlagHome (tempDir ()), 100 )
49
+ temp := tempDir ()
50
+ defer os .RemoveAll (temp )
51
+ tempApp := app .NewOdinApp (log .NewNopLogger (), dbm .NewMemDB (), nil , true , map [int64 ]bool {}, simtestutil .NewAppOptionsWithFlagHome (temp ), 100 )
51
52
encodingConfig := app .MakeEncodingConfig ()
52
53
53
54
initClientCtx := client.Context {}.
@@ -290,9 +291,8 @@ func appExport(
290
291
var tempDir = func () string {
291
292
dir , err := os .MkdirTemp ("" , "simapp" )
292
293
if err != nil {
293
- dir = simapp . DefaultNodeHome
294
+ panic ( "failed to create temp dir: " + err . Error ())
294
295
}
295
- defer os .RemoveAll (dir )
296
296
297
297
return dir
298
298
}
0 commit comments