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: remove redundant comparision in VerifyRangeProof #30951

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j2gg0s
Copy link
Contributor

@j2gg0s j2gg0s commented Dec 23, 2024

The code was introduced in #21250, where lastKey was passed in by the caller.

In #28331, the logic was modified to take the last element from keys as lastKey.

When keys contains only one element, lastKey is equal to keys[0].
After comparing firstKey and lastKey, there is no need to compare firstKey with keys[0] again.

@j2gg0s j2gg0s requested a review from rjl493456442 as a code owner December 23, 2024 11:51
@rjl493456442 rjl493456442 self-assigned this Dec 24, 2024
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