From af6b2a8293b9f0c38a466b4b995aadd15bdfa3c6 Mon Sep 17 00:00:00 2001 From: Upamanyu Sharma Date: Mon, 2 Dec 2024 13:32:05 -0500 Subject: [PATCH] Tweak for proof --- merkle/merkle.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/merkle/merkle.go b/merkle/merkle.go index 3fb031c..5696253 100644 --- a/merkle/merkle.go +++ b/merkle/merkle.go @@ -52,7 +52,8 @@ func (t *Tree) Put(label []byte, mapVal []byte) ([]byte, []byte, bool) { t.root = newInteriorNode() } interiors = append(interiors, t.root) - for depth := uint64(0); depth < cryptoffi.HashLen-1; depth++ { + n := cryptoffi.HashLen - 1 + for depth := uint64(0); depth < n; depth++ { currNode := interiors[depth] pos := label[depth] if currNode.children[pos] == nil {