|
|
@ -299,7 +299,7 @@ func (s *stateObject) updateTrie(db Database) Trie { |
|
|
|
if len(s.pendingStorage) == 0 { |
|
|
|
if len(s.pendingStorage) == 0 { |
|
|
|
return s.trie |
|
|
|
return s.trie |
|
|
|
} |
|
|
|
} |
|
|
|
// Track the amount of time wasted on updating the storge trie
|
|
|
|
// Track the amount of time wasted on updating the storage trie
|
|
|
|
if metrics.EnabledExpensive { |
|
|
|
if metrics.EnabledExpensive { |
|
|
|
defer func(start time.Time) { s.db.StorageUpdates += time.Since(start) }(time.Now()) |
|
|
|
defer func(start time.Time) { s.db.StorageUpdates += time.Since(start) }(time.Now()) |
|
|
|
} |
|
|
|
} |
|
|
@ -347,7 +347,7 @@ func (s *stateObject) updateRoot(db Database) { |
|
|
|
if s.updateTrie(db) == nil { |
|
|
|
if s.updateTrie(db) == nil { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// Track the amount of time wasted on hashing the storge trie
|
|
|
|
// Track the amount of time wasted on hashing the storage trie
|
|
|
|
if metrics.EnabledExpensive { |
|
|
|
if metrics.EnabledExpensive { |
|
|
|
defer func(start time.Time) { s.db.StorageHashes += time.Since(start) }(time.Now()) |
|
|
|
defer func(start time.Time) { s.db.StorageHashes += time.Since(start) }(time.Now()) |
|
|
|
} |
|
|
|
} |
|
|
@ -364,7 +364,7 @@ func (s *stateObject) CommitTrie(db Database) error { |
|
|
|
if s.dbErr != nil { |
|
|
|
if s.dbErr != nil { |
|
|
|
return s.dbErr |
|
|
|
return s.dbErr |
|
|
|
} |
|
|
|
} |
|
|
|
// Track the amount of time wasted on committing the storge trie
|
|
|
|
// Track the amount of time wasted on committing the storage trie
|
|
|
|
if metrics.EnabledExpensive { |
|
|
|
if metrics.EnabledExpensive { |
|
|
|
defer func(start time.Time) { s.db.StorageCommits += time.Since(start) }(time.Now()) |
|
|
|
defer func(start time.Time) { s.db.StorageCommits += time.Since(start) }(time.Now()) |
|
|
|
} |
|
|
|
} |
|
|
|