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

Makes Features::from_be_bytes public #2640

Merged

Conversation

sr-gi
Copy link
Contributor

@sr-gi sr-gi commented Oct 3, 2023

Downstream projects building Feature<T> are most likely doing so with a big-endian byte array, however only from_le_bytes is exposed.

@sr-gi sr-gi force-pushed the 20231003-expose-from-be-bytes branch from 7b72c6b to 60607b9 Compare October 3, 2023 12:53
@@ -718,7 +718,11 @@ impl<T: sealed::Context> Features<T> {
Ok(())
}

fn from_be_bytes(mut flags: Vec<u8>) -> Features<T> {
/// Create a Features given a set of flags, in big-endian. This is in byte order from
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
/// Create a Features given a set of flags, in big-endian. This is in byte order from
/// Create a [`Features`] given a set of flags, in big-endian. This is in byte order from

Downstream projects building Feature<T> are most likely doing so with a
big-endian byte array, however only `from_le_bytes` is exposed.
@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (9b1b724) 89.02% compared to head (2b1d693) 89.54%.
Report is 29 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2640      +/-   ##
==========================================
+ Coverage   89.02%   89.54%   +0.51%     
==========================================
  Files         112      112              
  Lines       86932    90657    +3725     
  Branches    86932    90657    +3725     
==========================================
+ Hits        77390    81177    +3787     
+ Misses       7307     7294      -13     
+ Partials     2235     2186      -49     
Files Coverage Δ
lightning/src/ln/features.rs 86.16% <100.00%> (-1.42%) ⬇️

... and 34 files with indirect coverage changes

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

@TheBlueMatt
Copy link
Collaborator

Clippy issue is unrelated.

@TheBlueMatt TheBlueMatt merged commit eea19de into lightningdevkit:main Oct 5, 2023
14 of 15 checks passed
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.

None yet

5 participants