From 4b9976f7b7973c0dc98294c4761a0e48b0cb6184 Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Mon, 17 Oct 2022 12:21:40 -0700 Subject: [PATCH] prune: speed up using 1<= 0 && capturedSpan < idxEnd; i-- { - nodeSpan := uint(math.Pow(float64(2), float64(treeDepth-i))) + // nodeSpan is 2**(treeDepth-i) == 1<<(treeDepth-i) + // Please see: https://github.com/celestiaorg/nmt/issues/72 + nodeSpan := uint(1 << (treeDepth - i)) if pathStart[i] == 0 { // if nodespan is less than end index, continue traversing upwards lastNode := nodeSpan + idxStart - 1