chore(store): use the built-in clear to clear the map (#23375)
Signed-off-by: hidewrong <hidewrong@outlook.com>
This commit is contained in:
parent
ec744ec88a
commit
d2aa3c25be
4
store/cache/cache.go
vendored
4
store/cache/cache.go
vendored
@ -84,9 +84,7 @@ func (cmgr *CommitKVStoreCacheManager) Reset() {
|
||||
// Clear the map.
|
||||
// Please note that we are purposefully using the map clearing idiom.
|
||||
// See https://github.com/cosmos/cosmos-sdk/issues/6681.
|
||||
for key := range cmgr.caches {
|
||||
delete(cmgr.caches, key)
|
||||
}
|
||||
clear(cmgr.caches)
|
||||
}
|
||||
|
||||
// CacheWrap implements the CacheWrapper interface
|
||||
|
||||
Loading…
Reference in New Issue
Block a user