From e9bc2950056738d6a18ba7d654a51a68828b783a Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Wed, 15 Jun 2022 20:18:47 +0000 Subject: [PATCH] Comments fixes --- lib/trie/proof/generate.go | 2 +- lib/trie/proof/verify.go | 2 +- lib/trie/proof/verify_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/trie/proof/generate.go b/lib/trie/proof/generate.go index 405c96f1315..939fe387aaa 100644 --- a/lib/trie/proof/generate.go +++ b/lib/trie/proof/generate.go @@ -39,7 +39,7 @@ func Generate(rootHash []byte, fullKey []byte, database Database) ( fullKeyNibbles := codec.KeyLEToNibbles(fullKey) encodedProofNodes, err = walk(rootNode, fullKeyNibbles) if err != nil { - // Note we wrap the full key context here since find is recursive and + // Note we wrap the full key context here since walk is recursive and // may not be aware of the initial full key. return nil, fmt.Errorf("walking to node at key 0x%x: %w", fullKey, err) } diff --git a/lib/trie/proof/verify.go b/lib/trie/proof/verify.go index bd5b1888005..afceea8cb0c 100644 --- a/lib/trie/proof/verify.go +++ b/lib/trie/proof/verify.go @@ -123,7 +123,7 @@ func buildTrie(encodedProofNodes [][]byte, rootHash []byte) (t *trie.Trie, err e } // loadProof is a recursive function that will create all the trie paths based -// on the mapped proofs slice starting at the root +// on the map from node hash to node starting at the root. func loadProof(proofHashToNode map[string]*node.Node, n *node.Node) { if n.Type() != node.Branch { return diff --git a/lib/trie/proof/verify_test.go b/lib/trie/proof/verify_test.go index 5127c19574c..d52c8356ba8 100644 --- a/lib/trie/proof/verify_test.go +++ b/lib/trie/proof/verify_test.go @@ -63,7 +63,7 @@ func Test_Verify(t *testing.T) { encodedProofNodes: [][]byte{ encodeNode(t, branch), encodeNode(t, leafB), - // TODO Note leaf A is small enough to be inlined in branch + // Note leaf A is small enough to be inlined in branch }, rootHash: blake2bNode(t, branch), keyLE: []byte{1, 1}, // nil child of branch