Skip to content

Bug: incorrect query generated by GetNodeRegistryAtHeight() #763

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

Closed
capt4ce opened this issue Apr 20, 2020 · 0 comments · Fixed by #765
Closed

Bug: incorrect query generated by GetNodeRegistryAtHeight() #763

capt4ce opened this issue Apr 20, 2020 · 0 comments · Fixed by #765
Assignees
Labels
BUG Something isn't working CORE core functionalities
Milestone

Comments

@capt4ce
Copy link
Contributor

capt4ce commented Apr 20, 2020

Description

I found a problem in the GetNodeRegistryAtHeight() query. If a there are 2 records under a group by, the query will consider any of the records, not only the latest one.
Screen Shot 2020-04-20 at 17 19 11

Steps to reproduce

  1. create an artificial records in the node_registry table that have same id but different height.
  2. make that first record to have registration_status=0 and the second one registration_status=2
  3. run the original query. It will return that artificial node although the latest registration_status==2

Expected behavior

If such situation happens, the query should consider the latest state of the record.

@capt4ce capt4ce added BUG Something isn't working CORE core functionalities labels Apr 20, 2020
@capt4ce capt4ce added this to the Milestone 14 milestone Apr 20, 2020
@capt4ce capt4ce self-assigned this Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working CORE core functionalities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant