Skip to content

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

@staheri14

Description

@staheri14

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) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions