Skip to content

Commit

Permalink
Clarify lexicographic hash favoring (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuterin authored and JustinDrake committed Apr 6, 2019
1 parent 690e4fa commit 199e784
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,7 @@ def lmd_ghost(store: Store, start_state: BeaconState, start_block: BeaconBlock)
children = get_children(store, head)
if len(children) == 0:
return head
# Ties broken by favoring block with lexicographically higher root
head = max(children, key=lambda x: (get_vote_count(x), hash_tree_root(x)))
```

Expand Down

0 comments on commit 199e784

Please sign in to comment.