chore(store): use the built-in clear to clear the map (#23375)

Signed-off-by: hidewrong <hidewrong@outlook.com>
This commit is contained in:
hidewrong
2025-01-14 10:21:06 +00:00
committed by GitHub
parent ec744ec88a
commit d2aa3c25be
+1 -3
View File
@@ -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