Update 0_beacon-chain.md

This commit is contained in:
terence tsao
2018-12-30 16:06:33 -08:00
committed by GitHub
parent 1a4973171f
commit c8ff723514

View File

@@ -1529,9 +1529,9 @@ def verify_merkle_branch(leaf: Hash32, branch: [Hash32], depth: int, index: int,
value = leaf
for i in range(depth):
if index % 2:
value = hash(branch[i], value)
value = hash(branch[i] + value)
else:
value = hash(value, branch[i])
value = hash(value + branch[i])
return value == root
```