Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix merkle_tree implementation #1391

Merged
merged 2 commits into from
Sep 16, 2019
Merged

Fix merkle_tree implementation #1391

merged 2 commits into from
Sep 16, 2019

Conversation

terencechain
Copy link
Contributor

@terencechain terencechain commented Sep 1, 2019

I think len(leaves) meant to be padded_length there

Say the following tree 4 5 and 6 are leaves. len(leaves) - 1 will start at index 2, but we want to start at index 3?

    1
 2     3
4 5   6 7

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct

@djrtwo djrtwo merged commit 97b3ffc into ethereum:dev Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants