celestiaorg/nmt

using a sized type i.e., int32 or int64 for leaf index in the foundInRange method of nmt

Opened this issue · 0 comments

For context please refer to the conversation on this issue #70

Originally suggested by @elias-orijtech in this comment

If you do settle on a signed type, I suggest being specific about the type (int32 or int64), or make the build fail if compiled on platforms where int is not at least 64 bits wide.

Link to the foundInRange method:

nmt/nmt.go

Line 435 in 0e219c8

func (n *NamespacedMerkleTree) foundInRange(nID namespace.ID) (found bool, startIndex int, endIndex int) {