From 484d0ddaae84bcfc533cd1bddd56dc50fa184c0b Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Fri, 1 May 2026 23:37:49 +0800 Subject: [PATCH] core/state: double check the lis availiability before regeneration --- core/state/snapshot/difflayer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/state/snapshot/difflayer.go b/core/state/snapshot/difflayer.go index 1286ded7e1..eb4efd2429 100644 --- a/core/state/snapshot/difflayer.go +++ b/core/state/snapshot/difflayer.go @@ -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