trie: fix i/index flaw

This commit is contained in:
Martin Holst Swende 2024-10-08 09:19:40 +02:00
parent c16a0183e5
commit b5c5f3bb13
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -120,7 +120,7 @@ func (c *committer) commitChildren(path []byte, n *fullNode, parallel bool) [17]
} else {
wg.Add(1)
go func(index int) {
p := append(path, byte(i))
p := append(path, byte(index))
childSet := trienode.NewNodeSet(c.nodes.Owner)
childComitter := newCommitter(childSet, c.tracer, c.collectLeaf, false)
h := childComitter.commit(p, child, false)