From a9961d4ce46d0653dd5d2e18a597282a54b905ca Mon Sep 17 00:00:00 2001 From: Cayman Date: Fri, 18 Oct 2019 03:38:06 -0500 Subject: [PATCH] Simplify get_helper_indices --- specs/light_client/merkle_proofs.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/specs/light_client/merkle_proofs.md b/specs/light_client/merkle_proofs.md index b021f1ac0..f6c77fffb 100644 --- a/specs/light_client/merkle_proofs.md +++ b/specs/light_client/merkle_proofs.md @@ -283,9 +283,7 @@ def get_helper_indices(indices: Sequence[GeneralizedIndex]) -> Sequence[Generali all_helper_indices = all_helper_indices.union(set(get_branch_indices(index))) all_path_indices = all_path_indices.union(set(get_path_indices(index))) - return sorted([ - x for x in all_helper_indices if x not in all_path_indices - ], reverse=True) + return sorted(all_helper_indices.difference(all_path_indices), reverse=True) ``` Now we provide the Merkle proof verification functions. First, for single item proofs: