From dd532d78876871cc56a5a5102c592eccc9c6be9d Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 11 Jan 2019 11:52:04 +0000 Subject: [PATCH] Update 0_beacon-chain.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Avoid abbreviations * Use `branch` as a more suggestive variable name than `ret` * Cleanup spacing after comma * Avoid having two index variables (`index` and `idx`)—Does this break anything? --- specs/core/0_beacon-chain.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index e2ed64cf1..b7fcd284d 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -695,12 +695,12 @@ def get_deposit_root() -> bytes32: @public @constant def get_merkle_branch(index: uint256) -> bytes32[32]: # size is DEPOSIT_CONTRACT_TREE_DEPTH (symbolic const not supported) - idx: uint256 = index + TWO_TO_POWER_OF_TREE_DEPTH - ret: bytes32[32] # size is DEPOSIT_CONTRACT_TREE_DEPTH + index = index + TWO_TO_POWER_OF_TREE_DEPTH + branch: bytes32[32] # size is DEPOSIT_CONTRACT_TREE_DEPTH for i in range(DEPOSIT_CONTRACT_TREE_DEPTH): - ret[i] = self.deposit_tree[bitwise_xor(idx,1)] - idx /= 2 - return ret + branch[i] = self.deposit_tree[bitwise_xor(index, 1)] + index /= 2 + return branch ``` ## Beacon chain processing