Skip to content

IMT new() does not initialize correctly when leaves are not provided #65

@0xjei

Description

@0xjei

Describe the bug
hello, when you try to create a new IMT without providing any leaves, the latest level (root) does not contain the latest zero_value, as happens for the TS implementation.

In fact, there's no test covering the IMT new() with an empty leaves vector.

To Reproduce
Steps to reproduce the behavior:

  1. call new() with an empty leaves vector.

Expected behavior
I'm expecting the root to have the latest zero_value.

Rust

Image

TS

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions