fix: commit and calc num
This commit is contained in:
parent
53b585e7ab
commit
2a6bb8720d
@ -1228,7 +1228,9 @@ func (s *StateDB) AccountsIntermediateRoot() {
|
|||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
tasks <- func() {
|
tasks <- func() {
|
||||||
obj.updateRoot()
|
obj.updateRoot()
|
||||||
|
if obj.trie != nil {
|
||||||
calcStateObjectCount.Add(1)
|
calcStateObjectCount.Add(1)
|
||||||
|
}
|
||||||
// Cache the data until commit. Note, this update mechanism is not symmetric
|
// Cache the data until commit. Note, this update mechanism is not symmetric
|
||||||
// to the deletion, because whereas it is enough to track account updates
|
// to the deletion, because whereas it is enough to track account updates
|
||||||
// at commit time, deletions need tracking at transaction boundary level to
|
// at commit time, deletions need tracking at transaction boundary level to
|
||||||
@ -1633,7 +1635,9 @@ func (s *StateDB) Commit(block uint64, failPostCommitFunc func(), postCommitFunc
|
|||||||
taskResults <- taskResult{err, nil}
|
taskResults <- taskResult{err, nil}
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
if obj.trie != nil {
|
||||||
committedStateObjectNum.Add(1)
|
committedStateObjectNum.Add(1)
|
||||||
|
}
|
||||||
taskResults <- taskResult{nil, set}
|
taskResults <- taskResult{nil, set}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user