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

restrict isRequestComplete to only the related oracle response #8

Conversation

trmid
Copy link
Member

@trmid trmid commented Jul 2, 2024

Changed isRequestComplete to be consistent with isRequestFailed such that it only considers the oracle response that resulted from the request. This provides consistency across the implementation while sacrificing the Witnet order backfill behaviour for requests; meaning that a request will only be considered complete if it's oracle response returned successfully.

The original issue points out a problem that arises from the inconsistent interface where an RNG request can be considered both failed and completed at the same time. This change enforces a consistent interface between the two so bots can make decisions in a more predictable environment.

Copy link

github-actions bot commented Jul 2, 2024

LCOV of commit 2ddd97f during Tests with 100% Coverage #56

Summary coverage rate:
  lines......: 100.0% (34 of 34 lines)
  functions..: 100.0% (16 of 16 functions)
  branches...: no data found

Files changed coverage rate:
                   |Lines       |Functions  |Branches    
  Filename         |Rate     Num|Rate    Num|Rate     Num
  =======================================================
  src/RngWitnet.sol| 100%     26| 100%    12|    -      0

@trmid trmid merged commit e44b23c into fix-review Jul 8, 2024
4 checks passed
@trmid trmid deleted the gen-1767-27-draws-can-be-retried-even-if-a-random-number-is-available branch July 11, 2024 13:35
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.

1 participant