[ot][spam][crazy][random][crazy]

Undescribed Horrific Abuse, One Victim & Survivor of Many gmkarl at gmail.com
Sat Nov 12 15:56:50 PST 2022


(Pdb) up
> /shared/src/flat_tree/test.py(30)iterate()
-> data = b''.join(iterate(subindex, adjusted_start, min(adjusted_end,
subsize - adjusted_start)))
(Pdb) list
 25                     yield data
 26                 else:
 27                     subindex = stored_indices[subid]
 28                     adjusted_start = start_offset - substartoffset
+ suboffset
 29                     adjusted_end = end_offset - substartoffset + suboffset
 30  ->                 data = b''.join(iterate(subindex,
adjusted_start, min(adjusted_end, subsize - adjusted_start)))
 31                     data = list(iterate(subindex, adjusted_start,
min(adjusted_end, subsize + suboffset)))

Immediately, it looks like I somehow uncommented two recursive calls
that imply conflicting things. It's clear only one of those
assignments to data should be uncommented.

Given the length of data is checked, the b''.join() call would be a wrong one.
It's notable that the last parameter in the two calls is different,
unfortunately.
So, which one is correct?
Probably hte other, given there's a negative offset in this use?

I commented out the recursive call it crashed in, and the tests now pass.


More information about the cypherpunks mailing list