Update specs/light_client/merkle_proofs.md
Co-Authored-By: Diederik Loerakker <proto@protolambda.com>
This commit is contained in:
parent
c6cdec8217
commit
c8d128aa59
|
@ -259,7 +259,7 @@ def verify_merkle_multiproof(leaves: Sequence[Hash], proof: Sequence[Hash], indi
|
||||||
while pos < len(keys):
|
while pos < len(keys):
|
||||||
k = keys[pos]
|
k = keys[pos]
|
||||||
if k in objects and k ^ 1 in objects and k // 2 not in objects:
|
if k in objects and k ^ 1 in objects and k // 2 not in objects:
|
||||||
objects[k // 2] = hash(objects[k & -2] + objects[k | 1])
|
objects[k // 2] = hash(objects[(k | 1) ^ 1] + objects[k | 1])
|
||||||
keys.append(k // 2)
|
keys.append(k // 2)
|
||||||
pos += 1
|
pos += 1
|
||||||
return objects[1] == root
|
return objects[1] == root
|
||||||
|
|
Loading…
Reference in New Issue