mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
core/state: double check the lis availiability before regeneration
This commit is contained in:
parent
19dc690af8
commit
484d0ddaae
1 changed files with 4 additions and 0 deletions
|
|
@ -431,6 +431,10 @@ func (dl *diffLayer) AccountList() []common.Hash {
|
|||
dl.lock.Lock()
|
||||
defer dl.lock.Unlock()
|
||||
|
||||
if list := dl.accountList; list != nil {
|
||||
return list
|
||||
}
|
||||
|
||||
dl.accountList = slices.SortedFunc(maps.Keys(dl.accountData), common.Hash.Cmp)
|
||||
dl.memory += uint64(len(dl.accountList) * common.HashLength)
|
||||
return dl.accountList
|
||||
|
|
|
|||
Loading…
Reference in a new issue