From 83c6e95bbea1e04cd4ccb52b4feb0225b81d5452 Mon Sep 17 00:00:00 2001 From: vbuterin Date: Thu, 7 Mar 2019 23:43:07 -0600 Subject: [PATCH] Break LMD GHOST ties in favor of higher hash tree roots --- specs/core/0_beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 898fc3c86e..c51effc9a2 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -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