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

[Access] Refactor executionNodesForBlockID by encapsulating its parameters into a struct #6499

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

UlyanaAndrukhiv
Copy link
Contributor

Closes: #6497

Note: #6468 should be merged first.

Context

This pull request introduces a new struct, ExecutionNodeIdentitiesProvider, which encapsulates the parameters previously passed around multiple functions. This struct is initialized during instance creation and includes fields for executionReceipts, state,preferredENIdentifiers, fixedENIdentifiers and other relevant data.

Changes:

  • Created a new ExecutionNodeIdentitiesProvider struct.
  • Refactored executionNodesForBlockID and related functions to use the new struct instead of individual parameters.
  • Updated relevant unit tests to reflect the changes in function signatures and verify the new implementation.

…BlockID, backend and ingestion engine, updated tests
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 55.15625% with 287 lines in your changes missing coverage. Please review.

Project coverage is 41.31%. Comparing base (79d1fe6) to head (cce8ebd).

Files with missing lines Patch % Lines
storage/mock/transaction_result_error_messages.go 0.00% 86 Missing ⚠️
cmd/access/node_builder/access_node_builder.go 0.00% 55 Missing ⚠️
...e/common/rpc/execution_node_identities_provider.go 68.03% 29 Missing and 10 partials ⚠️
cmd/observer/node_builder/observer_builder.go 0.00% 31 Missing ⚠️
...torage/badger/transaction_result_error_messages.go 75.92% 17 Missing and 9 partials ⚠️
storage/badger/operation/transaction_results.go 0.00% 22 Missing ⚠️
engine/access/ingestion/engine.go 76.81% 11 Missing and 5 partials ⚠️
engine/access/rpc/backend/backend_transactions.go 91.26% 5 Missing and 4 partials ⚠️
engine/access/rpc/backend/node_selector.go 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6499      +/-   ##
==========================================
+ Coverage   41.29%   41.31%   +0.02%     
==========================================
  Files        2030     2033       +3     
  Lines      145798   146145     +347     
==========================================
+ Hits        60205    60380     +175     
- Misses      79367    79529     +162     
- Partials     6226     6236      +10     
Flag Coverage Δ
unittests 41.31% <55.15%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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.

[Access] Refactor executionNodesForBlockID by encapsulating its parameters into a struct
2 participants