beacon-chain-java
beacon-chain-java copied to clipboard
ForkChoice::get_head doesn't break ties properly
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();