flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

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

Open UlyanaAndrukhiv opened this issue 1 year ago • 1 comments

Closes: #6497

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.

UlyanaAndrukhiv avatar Sep 25 '24 20:09 UlyanaAndrukhiv

Codecov Report

Attention: Patch coverage is 41.55844% with 90 lines in your changes missing coverage. Please review.

Project coverage is 41.19%. Comparing base (36f067d) to head (54ffb07).

Files with missing lines Patch % Lines
cmd/access/node_builder/access_node_builder.go 0.00% 48 Missing :warning:
cmd/observer/node_builder/observer_builder.go 0.00% 35 Missing :warning:
engine/access/rpc/backend/node_selector.go 0.00% 4 Missing :warning:
...e/common/rpc/execution_node_identities_provider.go 87.50% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6499      +/-   ##
==========================================
+ Coverage   41.14%   41.19%   +0.04%     
==========================================
  Files        2036     2036              
  Lines      179997   179972      -25     
==========================================
+ Hits        74060    74134      +74     
+ Misses      99720    99613     -107     
- Partials     6217     6225       +8     
Flag Coverage Δ
unittests 41.19% <41.55%> (+0.04%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Sep 25 '24 20:09 codecov-commenter