Skip to content
Open
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
7 changes: 6 additions & 1 deletion x/wasm/keeper/snapshotter.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ func (ws *WasmSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) e
if err != nil {
return err
}

defer func() {
// We should close the multistore to avoid leaking resources.
if closer, ok := cacheMS.(io.Closer); ok {
_ = closer.Close()
}
}()
ctx := sdk.NewContext(cacheMS, tmproto.Header{}, false, log.NewNopLogger())
seenBefore := make(map[string]bool)
var rerr error
Expand Down