core: use scheme-aware empty root in flushAlloc (#33168)

This commit is contained in:
Bashmunta 2025-11-13 10:15:44 +02:00 committed by Alvarez
parent 2cc9396d3a
commit 64910c1a9d

View file

@ -190,7 +190,7 @@ func flushAlloc(ga *types.GenesisAlloc, triedb *triedb.Database) (common.Hash, e
return common.Hash{}, err
}
// Commit newly generated states into disk if it's not empty.
if root != types.EmptyRootHash {
if root != emptyRoot {
if err := triedb.Commit(root, true); err != nil {
return common.Hash{}, err
}