Skip to content

Commit

Permalink
fix: genesis commit error
Browse files Browse the repository at this point in the history
  • Loading branch information
joeylichang committed Apr 17, 2024
1 parent c69cbf2 commit 730fd06
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1233,11 +1233,11 @@ func (s *StateDB) Commit(block uint64, deleteEmptyObjects bool) (common.Hash, er
nodes = trienode.NewMergedNodeSet()
incomplete map[common.Address]struct{}
)
//if s.stateRoot = s.StateIntermediateRoot(); s.expectedRoot != s.stateRoot {
// s.expectedRoot = s.stateRoot
// //log.Error("Invalid merkle root", "remote", s.expectedRoot, "local", s.stateRoot)
// //return fmt.Errorf("invalid merkle root (remote: %x local: %x)", s.expectedRoot, s.stateRoot)
//}
if block == 0 {
if s.stateRoot = s.StateIntermediateRoot(); s.expectedRoot != s.stateRoot {
s.expectedRoot = s.stateRoot
}
}
commmitTrie := func() error {
if metrics.EnabledExpensive {
defer func(start time.Time) { s.TrieAllCommits += time.Since(start) }(time.Now())
Expand Down

0 comments on commit 730fd06

Please sign in to comment.