Skip to content

Commit 09e4adc

Browse files
doc: Add godoc to VerifyMembership regarding path (#1742)
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
1 parent e5ec801 commit 09e4adc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules/core/23-commitment/types/merkle.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ func ApplyPrefix(prefix exported.Prefix, path MerklePath) (MerklePath, error) {
129129
var _ exported.Proof = (*MerkleProof)(nil)
130130

131131
// VerifyMembership verifies the membership of a merkle proof against the given root, path, and value.
132+
// Note that the path is expected as []string{<store key of module>, <key corresponding to requested value>}.
132133
func (proof MerkleProof) VerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, value []byte) error {
133134
if err := proof.validateVerificationArgs(specs, root); err != nil {
134135
return err

modules/core/exported/commitment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Path interface {
3535
// Proof implements spec:CommitmentProof.
3636
// Proof can prove whether the key-value pair is a part of the Root or not.
3737
// Each proof has designated key-value pair it is able to prove.
38-
// Proofs includes key but value is provided dynamically at the verification time.
38+
// Proofs include key but value is provided dynamically at the verification time.
3939
type Proof interface {
4040
VerifyMembership([]*ics23.ProofSpec, Root, Path, []byte) error
4141
VerifyNonMembership([]*ics23.ProofSpec, Root, Path) error

0 commit comments

Comments
 (0)