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

ForkChoice::get_head doesn't break ties properly #196

Open
ericsson49 opened this issue Sep 18, 2019 · 0 comments
Open

ForkChoice::get_head doesn't break ties properly #196

ericsson49 opened this issue Sep 18, 2019 · 0 comments
Labels
invalid This doesn't seem right spec Changes related to spec

Comments

@ericsson49
Copy link
Contributor

fork_choice/get_head specifies, that when choosing the heaviest child, ties should be broken lexicographically:

# Sort by latest attesting balance with ties broken lexicographically

However, Harmony implementation sorts by latest balance only.
head = children.stream().max(Comparator.comparing(root -> get_latest_attesting_balance(store, root))).get();

@ericsson49 ericsson49 added invalid This doesn't seem right spec Changes related to spec labels Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right spec Changes related to spec
Projects
None yet
Development

No branches or pull requests

1 participant