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

Make process() functions pub(crate) #328

Merged
merged 9 commits into from
Jan 9, 2023
Merged

Conversation

DaviRain-Su
Copy link
Contributor

@DaviRain-Su DaviRain-Su commented Jan 6, 2023

Closes: #338

Description


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests.
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Base: 62.96% // Head: 63.69% // Increases project coverage by +0.72% 🎉

Coverage data is based on head (62324e0) compared to base (9b4c146).
Patch coverage: 76.71% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #328      +/-   ##
==========================================
+ Coverage   62.96%   63.69%   +0.72%     
==========================================
  Files         124      124              
  Lines       13931    13773     -158     
==========================================
+ Hits         8772     8773       +1     
+ Misses       5159     5000     -159     
Impacted Files Coverage Δ
crates/ibc/src/core/ics02_client/msgs.rs 100.00% <ø> (ø)
...src/core/ics03_connection/handler/conn_open_ack.rs 78.05% <ø> (ø)
...core/ics03_connection/handler/conn_open_confirm.rs 78.68% <ø> (ø)
...rc/core/ics03_connection/handler/conn_open_init.rs 55.76% <ø> (ø)
...src/core/ics03_connection/handler/conn_open_try.rs 80.91% <ø> (ø)
crates/ibc/src/core/ics03_connection/msgs.rs 100.00% <ø> (ø)
...bc/src/core/ics04_channel/handler/chan_open_ack.rs 89.24% <ø> (ø)
...rc/core/ics04_channel/handler/chan_open_confirm.rs 83.72% <ø> (ø)
...c/src/core/ics04_channel/handler/chan_open_init.rs 86.04% <ø> (ø)
...bc/src/core/ics04_channel/handler/chan_open_try.rs 86.66% <ø> (ø)
... and 31 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@plafer plafer left a comment

Choose a reason for hiding this comment

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

Thank you for handling this one @DaviRain-Su

crates/ibc/src/core/ics02_client/msgs/update_client.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics03_connection/msgs.rs Outdated Show resolved Hide resolved
@DaviRain-Su
Copy link
Contributor Author

Because this ValidationContext trait is pub, it seems that MsgEnvelope must also be pub.

  pub trait ValidationContext {
        /// Validation entrypoint.
        fn validate(&self, message: MsgEnvelope) -> Result<(), RouterError>
        where
            Self: Sized,
        {

Copy link
Contributor

@plafer plafer left a comment

Choose a reason for hiding this comment

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

2 tiny changes left, and we're ready to merge

crates/ibc/src/core/ics26_routing/handler.rs Show resolved Hide resolved
crates/ibc/src/core/ics26_routing/handler.rs Show resolved Hide resolved
@@ -14,6 +14,7 @@ pub mod misbehaviour;
pub mod update_client;
pub mod upgrade_client;

#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this anymore, right?

Copy link
Contributor

@plafer plafer left a comment

Choose a reason for hiding this comment

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

Note that I made this PR close #338 instead. I'll fix #324 in an upcoming PR in light of learnings made in this PR.

Thank you!

@@ -0,0 +1,2 @@
- Make Msg* structs pub(crate) ([#324](https://github.com/cosmos/ibc-
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll update this when merging #327.

@plafer plafer changed the title Make Msg* structs pub(crate) Make process() functions pub(crate) Jan 9, 2023
@plafer plafer merged commit aa97ced into cosmos:main Jan 9, 2023
@DaviRain-Su DaviRain-Su deleted the fix-324 branch January 10, 2023 10:34
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* Make Msg* structs pub(crate)

* Create 324-make-msg-structs-pub-crate.md

* fix clippy

* Remove Unused new function

* fix merge error

* Revert pub(crate) because pub trait ValidationContext

* fix test
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.

Make internal process() functions pub(crate)
2 participants