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: replace manual receipt query execution with GetReceipt #1092

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

0xivanov
Copy link
Contributor

@0xivanov 0xivanov commented Oct 3, 2024

Description:

When manual ReceiptQuery is executed, the status returned is not validated, meaning it will not return error object.
Error object is returned only when the receipt query is executed by GetReceipt on the transaction result.

Currently if a transaction fails with throttle status and we call GetReceipt, it will retry, but if we create the receipt separately it would not retry or return an error.
This causes some integration tests to have flaky behaviour. Additionally manual execution of ReceiptQuery will return no error when an error code is actually returned.

This PR:

  1. Adds the ability to query child receipts from the transaction result.
  2. Replaces receipt query execution with GetReceipt in e2e tests.
  3. Replaces receipt query execution with GetReceipt in flows.

Related issue(s):

Fixes #1079

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Sorry, something went wrong.

Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
@0xivanov 0xivanov self-assigned this Oct 3, 2024
@0xivanov 0xivanov requested review from a team as code owners October 3, 2024 08:29
Copy link

sonarqubecloud bot commented Oct 3, 2024

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 73.60%. Comparing base (652fd8f) to head (8ea3482).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
transaction_response.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1092      +/-   ##
==========================================
- Coverage   73.64%   73.60%   -0.04%     
==========================================
  Files         174      174              
  Lines       25065    25064       -1     
==========================================
- Hits        18458    18449       -9     
- Misses       5863     5871       +8     
  Partials      744      744              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@gsstoykov gsstoykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@0xivanov 0xivanov merged commit 65e355a into main Oct 7, 2024
12 of 13 checks passed
@0xivanov 0xivanov deleted the 1079-make-receipt-query-return-error-object branch October 7, 2024 11:08
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.

Investigate failing test
2 participants