From 199e7849dafc48145dfbc6779ef2ccfa04e4a718 Mon Sep 17 00:00:00 2001 From: vbuterin Date: Sat, 6 Apr 2019 04:07:26 -0500 Subject: [PATCH] Clarify lexicographic hash favoring (#881) --- specs/core/0_beacon-chain.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 3f690c888..60e7864c2 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -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))) ```