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: Distinguish between ErrTxnHashNotFound and ErrInternal #2486

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

hudem1
Copy link
Contributor

@hudem1 hudem1 commented Feb 14, 2025

rpc pkg cleanup according to issue #2437

  • for v6: Updated handler code to take into account pending block as well.

  • for v7: Reuse v6 handler for v7 as the logic is the same.

  • for v8: The logic is the same as v6/v7, but not exactly the returned Transaction type (more particularly, Resource type inside Transaction type). Therefore, we cannot refactor v8's types or logic

@hudem1 hudem1 mentioned this pull request Feb 14, 2025
22 tasks
Copy link
Contributor

@AnkushinDaniil AnkushinDaniil left a comment

Choose a reason for hiding this comment

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

We should also be handling the pending block in v6 in the same way. As far as I know, this difference happened because the old code for v6 was copied in #2419 . You can use the same code from v7 and continue refactoring.

Copy link

codecov bot commented Feb 15, 2025

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Project coverage is 73.69%. Comparing base (0ddfa64) to head (df42ccc).

Files with missing lines Patch % Lines
rpc/v6/transaction.go 43.75% 6 Missing and 3 partials ⚠️

❌ Your patch check has failed because the patch coverage (47.05%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2486      +/-   ##
==========================================
- Coverage   73.78%   73.69%   -0.09%     
==========================================
  Files         138      138              
  Lines       16925    16919       -6     
==========================================
- Hits        12488    12469      -19     
- Misses       3571     3580       +9     
- Partials      866      870       +4     

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

@hudem1
Copy link
Contributor Author

hudem1 commented Feb 17, 2025

We should also be handling the pending block in v6 in the same way. As far as I know, this difference happened because the old code for v6 was copied in #2419 . You can use the same code from v7 and continue refactoring.

Ah yes indeed, good catch! I updated v6 code, and I could then reuse v6 handler for v7.

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