From 95eed765da374cfa236cdf005449e93c75d0545d Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Fri, 2 Aug 2024 17:50:00 +0200 Subject: [PATCH] docs: add comment to leaf case in verify subtree roots inclusion --- proof.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proof.go b/proof.go index b260e17..e0935ba 100644 --- a/proof.go +++ b/proof.go @@ -528,6 +528,9 @@ func (proof Proof) VerifySubtreeRootInclusion(nth *NmtHasher, subtreeRoots [][]b return popIfNonEmpty(&subtreeRoots), nil } + // at this level, we reached a leaf, but we couldn't find any range corresponding + // to needed leaf [start, end). + // this means that the initial provided [start, end) range was invalid. if end-start == 1 { return nil, fmt.Errorf("the provided range [%d, %d) does not reference a valid inner node", proof.start, proof.end) }