Update 0_beacon-chain.md
* 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?
This commit is contained in:
parent
78fcda7ce0
commit
dd532d7887
|
@ -695,12 +695,12 @@ def get_deposit_root() -> bytes32:
|
||||||
@public
|
@public
|
||||||
@constant
|
@constant
|
||||||
def get_merkle_branch(index: uint256) -> bytes32[32]: # size is DEPOSIT_CONTRACT_TREE_DEPTH (symbolic const not supported)
|
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
|
index = index + TWO_TO_POWER_OF_TREE_DEPTH
|
||||||
ret: bytes32[32] # size is DEPOSIT_CONTRACT_TREE_DEPTH
|
branch: bytes32[32] # size is DEPOSIT_CONTRACT_TREE_DEPTH
|
||||||
for i in range(DEPOSIT_CONTRACT_TREE_DEPTH):
|
for i in range(DEPOSIT_CONTRACT_TREE_DEPTH):
|
||||||
ret[i] = self.deposit_tree[bitwise_xor(idx,1)]
|
branch[i] = self.deposit_tree[bitwise_xor(index, 1)]
|
||||||
idx /= 2
|
index /= 2
|
||||||
return ret
|
return branch
|
||||||
```
|
```
|
||||||
|
|
||||||
## Beacon chain processing
|
## Beacon chain processing
|
||||||
|
|
Loading…
Reference in New Issue