From 84965be2517a028056a16580d6663e830e481558 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Sun, 1 Sep 2019 11:07:44 -0700 Subject: [PATCH] Update merkle_proofs.md --- specs/light_client/merkle_proofs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/light_client/merkle_proofs.md b/specs/light_client/merkle_proofs.md index e42de9f37..092f7142e 100644 --- a/specs/light_client/merkle_proofs.md +++ b/specs/light_client/merkle_proofs.md @@ -62,7 +62,7 @@ Note that the generalized index has the convenient property that the two childre def merkle_tree(leaves: Sequence[Hash]) -> Sequence[Hash]: padded_length = get_next_power_of_two(len(leaves)) o = [Hash()] * padded_length + list(leaves) + [Hash()] * (padded_length - len(leaves)) - for i in range(len(padded_length) - 1, 0, -1): + for i in range(padded_length - 1, 0, -1): o[i] = hash(o[i * 2] + o[i * 2 + 1]) return o ```