diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index 89e9f85147..76949b4243 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -18,7 +18,7 @@ - (bug) [\#2047](https://github.com/bandprotocol/bandchain/pull/2047) Fix request search ordering in 0.38. - (bug) [\#2046](https://github.com/bandprotocol/bandchain/pull/2043) Use dash for bandcli report-info. - (impv) [\#2043](https://github.com/bandprotocol/bandchain/pull/2043) Add full raw requests information in request struct. -- (chore) [\#2040](https://github.com/bandprotocol/bandchain/pull/2040) Set HomeFlag to /tmp for SimApp. +- (chore) [\#2040](https://github.com/bandprotocol/bandchain/pull/2040) + [\#2044](https://github.com/bandprotocol/bandchain/pull/2044) Set HomeFlag to /tmp for SimApp. - (patch) [\#2037](https://github.com/bandprotocol/bandchain/pull/2037) Patch Multistore proof to new structure tree of 0.38. - (impv) [\#1892](https://github.com/bandprotocol/bandchain/pull/1892) Rewrite execution environment for wasmer - (patch) [\#1999](https://github.com/bandprotocol/bandchain/pull/1999) Patch to Cosmos-SDK 0.38.4 diff --git a/chain/simapp/app.go b/chain/simapp/app.go index 2311cfe0ec..c349d8a06f 100644 --- a/chain/simapp/app.go +++ b/chain/simapp/app.go @@ -1,6 +1,7 @@ package simapp import ( + "io/ioutil" "math/rand" "time" @@ -101,8 +102,12 @@ func createValidatorTx(chainID string, acc Account, moniker string, selfDelegati // NewSimApp creates instance of our app using in test. func NewSimApp(chainID string, logger log.Logger) *bandapp.BandApp { - // Set HomeFlag to /tmp folder for simulation run. - viper.Set(cli.HomeFlag, "/tmp") + // Sets HomeFlag to a temp folder for simulation run. + dir, err := ioutil.TempDir("", "bandd") + if err != nil { + panic(err) + } + viper.Set(cli.HomeFlag, dir) db := dbm.NewMemDB() app := bandapp.NewBandApp(logger, db, nil, true, 0, map[int64]bool{}, "") genesis := bandapp.NewDefaultGenesisState()