trie: set back parallelism-threshold to 100

This commit is contained in:
Martin Holst Swende 2024-10-07 14:03:12 +02:00
parent 4abe141814
commit c16a0183e5
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -647,8 +647,8 @@ func (t *Trie) Commit(collectLeaf bool) (common.Hash, *trienode.NodeSet) {
for _, path := range t.tracer.deletedNodes() { for _, path := range t.tracer.deletedNodes() {
nodes.AddNode([]byte(path), trienode.NewDeleted()) nodes.AddNode([]byte(path), trienode.NewDeleted())
} }
// If the number of changes is below 400, we let one thread handle it // If the number of changes is below 100, we let one thread handle it
t.root = newCommitter(nodes, t.tracer, collectLeaf, t.uncommitted > 400).Commit(t.root) t.root = newCommitter(nodes, t.tracer, collectLeaf, t.uncommitted > 100).Commit(t.root)
t.uncommitted = 0 t.uncommitted = 0
return rootHash, nodes return rootHash, nodes
} }