good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 90af6dae authored by Péter Szilágyi's avatar Péter Szilágyi
Browse files

core/state/snapshot: don't create storage list for non-existing accounts

parent 39c64d85
No related branches found
No related tags found
No related merge requests found
...@@ -526,6 +526,11 @@ func (dl *diffLayer) StorageList(accountHash common.Hash) ([]common.Hash, bool) ...@@ -526,6 +526,11 @@ func (dl *diffLayer) StorageList(accountHash common.Hash) ([]common.Hash, bool)
// If an old list already exists, return it // If an old list already exists, return it
dl.lock.RLock() dl.lock.RLock()
_, destructed := dl.destructSet[accountHash] _, destructed := dl.destructSet[accountHash]
if _, ok := dl.storageData[accountHash]; !ok {
// Account not tracked by this layer
dl.lock.RUnlock()
return nil, destructed
}
if list, exist := dl.storageList[accountHash]; exist { if list, exist := dl.storageList[accountHash]; exist {
dl.lock.RUnlock() dl.lock.RUnlock()
return list, destructed // The list might be nil return list, destructed // The list might be nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment