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

candidate fix not complete #3700

Closed
dustinxie opened this issue Dec 1, 2022 · 0 comments · Fixed by #3702
Closed

candidate fix not complete #3700

dustinxie opened this issue Dec 1, 2022 · 0 comments · Fixed by #3702
Assignees
Labels
bug Something isn't working

Comments

@dustinxie
Copy link
Member

What version of iotex-core image (or code branch) are you using?

c316b81

What did you expect to see?

  1. dry-run the candidate fix couple of times
  2. it should generate same digest each time

What did you see instead?

it can generate diff digest, see https://www.diffchecker.com/gMQfaast line 483

Root-cause: c316b81#diff-4c37354767dc7764b93f5ed545905b6ee391187134ad8f29c09a7c71dfc51518R53-R60 added 2 duplicate candidates to retval, and sort.Sort(retval) can produce different order

Suggested fix:

  1. just call candCenter.Upsert() for these 2 duplicate candidates, no need to sort the list, and no need to add them to retval
  2. it is better to keep sort.Sort(cands) inside flush(), i.e., revert this: c316b81#diff-4c37354767dc7764b93f5ed545905b6ee391187134ad8f29c09a7c71dfc51518L124
@dustinxie dustinxie added the bug Something isn't working label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants