Skip to content

Commit

Permalink
Comments fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Jun 15, 2022
1 parent 115427b commit e9bc295
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/trie/proof/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/trie/proof/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/trie/proof/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e9bc295

Please sign in to comment.