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: restrict ChainUpdate fields visibility #10388

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

pugachAG
Copy link
Contributor

@pugachAG pugachAG commented Jan 5, 2024

Removes pub(crate) from ChainUpdate fields. All usage is refactored to directly use Chain's fields.

This is a follow-up for #10380.

@pugachAG pugachAG requested a review from a team as a code owner January 5, 2024 15:20
@pugachAG pugachAG added the C-housekeeping Category: Refactoring, cleanups, code quality label Jan 5, 2024
@pugachAG pugachAG force-pushed the refactor-chain-update branch from 16aa155 to 66682e0 Compare January 5, 2024 21:45
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (ccbb5e4) 71.99% compared to head (66682e0) 72.02%.
Report is 1 commits behind head on master.

Files Patch % Lines
chain/chain/src/chain.rs 18.75% 10 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10388      +/-   ##
==========================================
+ Coverage   71.99%   72.02%   +0.02%     
==========================================
  Files         718      718              
  Lines      144524   144520       -4     
  Branches   144524   144520       -4     
==========================================
+ Hits       104050   104089      +39     
+ Misses      35722    35686      -36     
+ Partials     4752     4745       -7     
Flag Coverage Δ
backward-compatibility 0.08% <0.00%> (ø)
db-migration 0.08% <0.00%> (ø)
genesis-check 1.26% <0.00%> (ø)
integration-tests 36.73% <18.75%> (+0.07%) ⬆️
linux 71.56% <18.75%> (+<0.01%) ⬆️
linux-nightly 71.58% <18.75%> (+0.01%) ⬆️
macos 54.86% <18.75%> (+1.08%) ⬆️
pytests 1.48% <0.00%> (ø)
sanity-checks 1.27% <0.00%> (ø)
unittests 68.25% <18.75%> (+0.01%) ⬆️
upgradability 0.13% <0.00%> (ø)

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 mut store_update = chain_update.chain_store_update.store().store_update();
let epoch_manager = self.epoch_manager.clone();
let mut chain_store_update = self.store.store_update();
let mut store_update = store.store_update();
Copy link
Contributor

Choose a reason for hiding this comment

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

Aah this is super confusing. store can be ChainStore or Store depending on whether it comes from self.store or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the future we might want to rename all references to store of type ChainStore to chain_store maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I agree, chain_store would be better

Copy link
Contributor

Choose a reason for hiding this comment

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

@pugachAG pugachAG added this pull request to the merge queue Jan 8, 2024
Merged via the queue into near:master with commit 16a689e Jan 8, 2024
20 of 22 checks passed
@pugachAG pugachAG deleted the refactor-chain-update branch January 8, 2024 10:34
github-merge-queue bot pushed a commit that referenced this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-housekeeping Category: Refactoring, cleanups, code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants