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 18:21:06 +08:00 committed by GitHub
parent ec744ec88a
commit d2aa3c25be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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