Skip to content

Commit dbcc24a

Browse files
authored
Merge pull request #14 from kcalvinalvin/2024-08-26-add-check
Add check for length
2 parents 4743f78 + 71d0c46 commit dbcc24a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pytreexo.py

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def right_sibling(position: int) -> int:
135135

136136
def calculate_roots(numleaves: int, dels: [bytes], proof: Proof) -> [bytes]:
137137
if not proof.targets: return []
138+
if len(proof.targets) != len(dels): raise("len of dels and proof.targets differ")
138139

139140
position_hashes = {}
140141
for i, target in enumerate(proof.targets):

0 commit comments

Comments
 (0)