-
Notifications
You must be signed in to change notification settings - Fork 345
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
Makes Features::from_be_bytes public #2640
Conversation
7b72c6b
to
60607b9
Compare
lightning/src/ln/features.rs
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
/// 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.
60607b9
to
2b1d693
Compare
Codecov ReportAll modified lines are covered by tests ✅
❗ 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
☔ View full report in Codecov by Sentry. |
Clippy issue is unrelated. |
Downstream projects building
Feature<T>
are most likely doing so with a big-endian byte array, however onlyfrom_le_bytes
is exposed.