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

refactor: move fns as default implementation in EpochManagerAdapter trait #12853

Merged
merged 6 commits into from
Jan 31, 2025

Conversation

stedfn
Copy link
Contributor

@stedfn stedfn commented Jan 31, 2025

The PR makes some functions as default implementation in the EpochManagerAdapter trait and deletes unused functions like copy_epoch_info_as_of_block and get_all_block_approvers_ordered

@stedfn stedfn changed the title [wip] refactor: move fns as default implementation in EpochManagerAdapter trait refactor: move fns as default implementation in EpochManagerAdapter trait Jan 31, 2025
@stedfn stedfn requested a review from pugachAG January 31, 2025 14:55
@stedfn stedfn marked this pull request as ready for review January 31, 2025 14:56
@stedfn stedfn requested a review from a team as a code owner January 31, 2025 14:56
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 59.75610% with 33 lines in your changes missing coverage. Please review.

Project coverage is 70.40%. Comparing base (72999fa) to head (60d0950).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
chain/epoch-manager/src/adapter.rs 66.19% 7 Missing and 17 partials ⚠️
chain/chain/src/test_utils/kv_runtime.rs 0.00% 6 Missing ⚠️
chain/chain/src/runtime/mod.rs 0.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12853      +/-   ##
==========================================
+ Coverage   70.39%   70.40%   +0.01%     
==========================================
  Files         851      851              
  Lines      174188   174105      -83     
  Branches   174188   174105      -83     
==========================================
- Hits       122614   122579      -35     
+ Misses      46327    46282      -45     
+ Partials     5247     5244       -3     
Flag Coverage Δ
backward-compatibility 0.16% <0.00%> (+<0.01%) ⬆️
db-migration 0.16% <0.00%> (+<0.01%) ⬆️
genesis-check 1.41% <0.00%> (+<0.01%) ⬆️
linux 70.08% <59.75%> (+0.01%) ⬆️
linux-nightly 70.04% <59.75%> (+0.01%) ⬆️
pytests 1.71% <0.00%> (+<0.01%) ⬆️
sanity-checks 1.53% <0.00%> (+<0.01%) ⬆️
unittests 70.23% <59.75%> (+0.01%) ⬆️
upgradability 0.20% <0.00%> (+<0.01%) ⬆️

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.

let epoch_manager = self.read();
epoch_manager.get_all_block_approvers_ordered(parent_hash)
Copy link
Contributor

Choose a reason for hiding this comment

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

why do want to inline it as part of EpochManagerHandle?

Copy link
Contributor Author

@stedfn stedfn Jan 31, 2025

Choose a reason for hiding this comment

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

no good reason. reverted with a minor modification

@stedfn stedfn added this pull request to the merge queue Jan 31, 2025
Merged via the queue into master with commit e57cc68 Jan 31, 2025
27 of 29 checks passed
@stedfn stedfn deleted the stefan/em_default_impls branch January 31, 2025 17:36
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