Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: edge case fix for integer pair iter #3508

Merged

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Oct 28, 2021

Description

  • Correctly handle start = 255u8 and end = 255
  • End is exclusive, so when overflowing it returns MAX - 1

Motivation and Context

Passing start = 255u8 and end = 255 into the iterator resulted in a non-terminating iterator.
This iterator is used for pagination on the database and grpc handlers

How Has This Been Tested?

Unit tests for this case

@aviator-app aviator-app bot merged commit 097e3e2 into tari-project:development Nov 3, 2021
@sdbondi sdbondi deleted the utils-fix-paging-iterator branch November 3, 2021 10:12
stringhandler added a commit that referenced this pull request Nov 4, 2021
BREAKING CHANGES

* implement new CipherSeed and upgrade encryption KDF (#3505)

Features

* add a Rejected status to TransactionStatus ([#3512](#3512)) ([c65a01c](c65a01c))
* add caching and clippy annotations to CI ([#3518](#3518)) ([beacb9e](beacb9e))
* implement new CipherSeed and upgrade encryption KDF ([#3505](#3505)) ([ef4f84f](ef4f84f))

Bug Fixes

* edge case fix for integer pair iter ([#3508](#3508)) ([097e3e2](097e3e2))
* header sync must allow transition to archival/pruned if tip is behind ([#3520](#3520)) ([e028386](e028386))
@sdbondi sdbondi restored the utils-fix-paging-iterator branch February 3, 2022 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants