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

trie: fix range prover #24266

Merged
merged 1 commit into from
Jan 21, 2022
Merged

Conversation

rjl493456442
Copy link
Member

Fixes #24257

@@ -505,7 +505,7 @@ func VerifyRangeProof(rootHash common.Hash, firstKey []byte, lastKey []byte, key
if val != nil || hasRightElement(root, firstKey) {
return false, errors.New("more entries available")
}
return hasRightElement(root, firstKey), nil
return false, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks strange. With this change, this entire clause will always return false in the first return-parameter, I think

Copy link
Contributor

Choose a reason for hiding this comment

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

Edit: nevermind, I think this is fine

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@holiman holiman added this to the 1.10.16 milestone Jan 21, 2022
@holiman
Copy link
Contributor

holiman commented Jan 21, 2022

Please add the testcase too

@holiman
Copy link
Contributor

holiman commented Jan 21, 2022

Actually, no need to add the testcase, we can merge the other PR too

@holiman holiman merged commit ae45c97 into ethereum:master Jan 21, 2022
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Jan 21, 2022
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
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