Skip to content

Commit 3b1f34d

Browse files
committed
added extra comments
1 parent 8d0dafd commit 3b1f34d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

x/merkledb/proof.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,11 @@ func validateRangeChangeProof(
289289
// [startProof] is an inclusion/exclusion proof of [start]
290290
startProofKey = maybe.Bind(start, ToKey)
291291

292-
// [endProof] is an inclusion of the largest key in [keyValues],
293-
// or an exclusion proof of [end] if [keyValues] is empty.
292+
// [endProof] is an inclusion of the largest key in [keyValues].
293+
//
294+
// If [keyValues] is empty:
295+
// - range proof: an exclusion proof of [end]
296+
// - change proof: an inclusion/exclusion proof of [end].
294297
endProofKey = maybe.Bind(end, ToKey)
295298
)
296299

@@ -902,6 +905,7 @@ func addPathInfo(
902905

903906
// Add [proofNode]'s children which are outside the range
904907
// [insertChildrenLessThan, insertChildrenGreaterThan].
908+
// What is inside the range, should be included in provided key-values.
905909
for index, childID := range proofNode.Children {
906910
var compressedKey Key
907911
if existingChild, ok := n.children[index]; ok {

0 commit comments

Comments
 (0)