Skip to content

Commit

Permalink
cleanup vm after finish the simulation (#3090)
Browse files Browse the repository at this point in the history
  • Loading branch information
giskook authored Apr 11, 2023
1 parent a4c6b66 commit 9fc23a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/wasm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,10 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return moduleLogger(ctx)
}

func (k *Keeper) Cleanup() {
k.wasmVM.Cleanup()
}

func (k *Keeper) SetInnerTxKeeper(innertxKeeper innertx.InnerTxKeeper) {
k.innertxKeeper = innertxKeeper
}
Expand Down
1 change: 1 addition & 0 deletions x/wasm/simulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func (w *Simulator) Release() {
return
}
proxy.PutBackStorePool(w.ctx.MultiStore().(sdk.CacheMultiStore))
w.k.Cleanup()
}

func NewProxyKeeper() keeper.Keeper {
Expand Down

0 comments on commit 9fc23a8

Please sign in to comment.