Skip to content

Commit

Permalink
remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kcalvinalvin committed Aug 21, 2024
1 parent 56e6602 commit 43bb12c
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions pytreexo.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ def tree_rows(n: int) -> int:
return 0 if n == 0 else (n - 1).bit_length()


def row_maxpos(row: int, total_row: int) -> int:
mask = (2 << total_row) - 1
return ((mask << int(total_row-row)) & mask) - 1


def root_position(leaves: int, row: int, total_rows: int) -> int:
mask = (2 << total_rows) - 1
before = leaves & (mask << (row + 1))
Expand All @@ -113,20 +108,6 @@ def isroot(position: int, numleaves: int, total_rows: int) -> bool:
return root_present and rootpos == position


def next_least_list(list0, list1):
if list0 and list1:
if list0[0] < list1[0]:
return 0
else:
return 1
elif list0 and not list1:
return 0
elif not list0 and list1:
return 1
else:
return None


def calculate_roots(numleaves: int, dels: [bytes], proof: Proof) -> [bytes]:
if not proof.targets:
return []
Expand Down

0 comments on commit 43bb12c

Please sign in to comment.