From 09e4adc6a70c6c4dfcd9d2b979d156c3d65f65e0 Mon Sep 17 00:00:00 2001 From: rene <41963722+renaynay@users.noreply.github.com> Date: Mon, 8 Aug 2022 15:46:59 +0200 Subject: [PATCH] doc: Add godoc to VerifyMembership regarding path (#1742) Co-authored-by: Carlos Rodriguez --- modules/core/23-commitment/types/merkle.go | 1 + modules/core/exported/commitment.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/23-commitment/types/merkle.go b/modules/core/23-commitment/types/merkle.go index 2c1663a1971..92869dc2919 100644 --- a/modules/core/23-commitment/types/merkle.go +++ b/modules/core/23-commitment/types/merkle.go @@ -129,6 +129,7 @@ func ApplyPrefix(prefix exported.Prefix, path MerklePath) (MerklePath, error) { var _ exported.Proof = (*MerkleProof)(nil) // VerifyMembership verifies the membership of a merkle proof against the given root, path, and value. +// Note that the path is expected as []string{, }. func (proof MerkleProof) VerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, value []byte) error { if err := proof.validateVerificationArgs(specs, root); err != nil { return err diff --git a/modules/core/exported/commitment.go b/modules/core/exported/commitment.go index 99f304e2792..e140d6c651e 100644 --- a/modules/core/exported/commitment.go +++ b/modules/core/exported/commitment.go @@ -35,7 +35,7 @@ type Path interface { // Proof implements spec:CommitmentProof. // Proof can prove whether the key-value pair is a part of the Root or not. // Each proof has designated key-value pair it is able to prove. -// Proofs includes key but value is provided dynamically at the verification time. +// Proofs include key but value is provided dynamically at the verification time. type Proof interface { VerifyMembership([]*ics23.ProofSpec, Root, Path, []byte) error VerifyNonMembership([]*ics23.ProofSpec, Root, Path) error