Skip to content

Commit

Permalink
Break LMD GHOST ties in favor of higher hash tree roots (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuterin authored and JustinDrake committed Mar 8, 2019
1 parent 8e08e74 commit 8dcc1ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ def lmd_ghost(store: Store, start_state: BeaconState, start_block: BeaconBlock)
children = get_children(store, head)
if len(children) == 0:
return head
head = max(children, key=get_vote_count)
head = max(children, key=lambda x: (get_vote_count(x), hash_tree_root(x)))
```

## Beacon chain state transition function
Expand Down

0 comments on commit 8dcc1ba

Please sign in to comment.