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 GitHub
parent f23d506b7d
commit fa16c89bfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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
}