trie: verkle comment nitpicks

This commit is contained in:
Péter Szilágyi 2024-06-12 12:21:30 +03:00 committed by GitHub
parent 886fe1ab03
commit 3880e9e6b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -221,13 +221,13 @@ func (t *VerkleTrie) Commit(_ bool) (common.Hash, *trienode.NodeSet) {
root := t.root.(*verkle.InternalNode) root := t.root.(*verkle.InternalNode)
nodes, err := root.BatchSerialize() nodes, err := root.BatchSerialize()
if err != nil { if err != nil {
// error return from this function indicates error in the code logic // Error return from this function indicates error in the code logic
// of BatchSerialize, and we fail catastrophically if this is the case. // of BatchSerialize, and we fail catastrophically if this is the case.
panic(fmt.Errorf("BatchSerialize failed: %v", err)) panic(fmt.Errorf("BatchSerialize failed: %v", err))
} }
nodeset := trienode.NewNodeSet(common.Hash{}) nodeset := trienode.NewNodeSet(common.Hash{})
for _, node := range nodes { for _, node := range nodes {
// hash parameter is not used in pathdb // Hash parameter is not used in pathdb
nodeset.AddNode(node.Path, trienode.New(common.Hash{}, node.SerializedBytes)) nodeset.AddNode(node.Path, trienode.New(common.Hash{}, node.SerializedBytes))
} }
// Serialize root commitment form // Serialize root commitment form