core/state/snapshot: fix StorageList memory accounting

This commit is contained in:
Bashmunta 2025-12-30 22:14:26 +02:00 committed by GitHub
parent 52ae75afcd
commit 424c2a5f58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -465,6 +465,6 @@ func (dl *diffLayer) StorageList(accountHash common.Hash) []common.Hash {
storageList := slices.SortedFunc(maps.Keys(dl.storageData[accountHash]), common.Hash.Cmp)
dl.storageList[accountHash] = storageList
dl.memory += uint64(len(dl.storageList)*common.HashLength + common.HashLength)
dl.memory += uint64(len(storageList)*common.HashLength + common.HashLength)
return storageList
}