beacon-chain-java icon indicating copy to clipboard operation
beacon-chain-java copied to clipboard

ForkChoice::get_head doesn't break ties properly

Open ericsson49 opened this issue 6 years ago • 0 comments

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 avatar Sep 18 '19 09:09 ericsson49