fix failing tests

This commit is contained in:
Guillaume Ballet 2025-04-14 12:16:30 +02:00
parent 9d2db926b9
commit bb038c64a5
2 changed files with 1 additions and 2 deletions

View file

@ -470,7 +470,7 @@ func (g *Genesis) chainConfigOrDefault(ghash common.Hash, stored *params.ChainCo
// IsVerkle indicates whether the state is already stored in a verkle // IsVerkle indicates whether the state is already stored in a verkle
// tree at genesis time. // tree at genesis time.
func (g *Genesis) IsVerkle() bool { func (g *Genesis) IsVerkle() bool {
return g.Config.VerkleTime != nil && *g.Config.VerkleTime == g.Timestamp return g != nil && g.Config != nil && g.Config.VerkleTime != nil && *g.Config.VerkleTime == g.Timestamp
} }
// ToBlock returns the genesis block according to genesis specification. // ToBlock returns the genesis block according to genesis specification.

View file

@ -1275,7 +1275,6 @@ func (s *StateDB) commitAndFlush(block uint64, deleteEmptyObjects bool, noStorag
return nil, err return nil, err
} }
} }
s.db.SaveTransitionState(ret.root, &TransitionState{Ended: true})
if !ret.empty() { if !ret.empty() {
// If snapshotting is enabled, update the snapshot tree with this new version // If snapshotting is enabled, update the snapshot tree with this new version
if snap := s.db.Snapshot(); snap != nil && snap.Snapshot(ret.originRoot) != nil { if snap := s.db.Snapshot(); snap != nil && snap.Snapshot(ret.originRoot) != nil {