Skip to content

Commit

Permalink
Merge pull request #1695 from cyyber/dev
Browse files Browse the repository at this point in the history
API Fix get_ots
  • Loading branch information
jplomas authored Mar 30, 2020
2 parents 3ed23c0 + b0e3414 commit 64e09b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qrl/core/qrlnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,10 @@ def get_ots(self,
max_bitfield = 2 ** OptimizedAddressState.get_height_from_address(address)
max_pages = (max_bitfield // config.dev.ots_tracking_per_page) + 1
page_from = min(page_from, max_pages)
max_pages = min(page_from + page_count, max_pages)
max_pages = min(page_from + page_count - 1, max_pages)

bitfields = list()
for page in range(page_from, max_pages):
for page in range(page_from, max_pages + 1):
bitfield = self._chain_manager.get_bitfield(address, page)
bitfields.append(qrl_pb2.OTSBitfieldByPage(ots_bitfield=bitfield, page_number=page))

Expand Down

0 comments on commit 64e09b8

Please sign in to comment.