Skip to content

Commit eea19de

Browse files
authored
Merge pull request #2640 from sr-gi/20231003-expose-from-be-bytes
Makes Features::from_be_bytes public
2 parents 9de51f0 + 2b1d693 commit eea19de

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning/src/ln/features.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,11 @@ impl<T: sealed::Context> Features<T> {
718718
Ok(())
719719
}
720720

721-
fn from_be_bytes(mut flags: Vec<u8>) -> Features<T> {
721+
/// Create a [`Features`] given a set of flags, in big-endian. This is in byte order from
722+
/// most on-the-wire encodings.
723+
///
724+
/// This is not exported to bindings users as we don't support export across multiple T
725+
pub fn from_be_bytes(mut flags: Vec<u8>) -> Features<T> {
722726
flags.reverse(); // Swap to little-endian
723727
Self {
724728
flags,

0 commit comments

Comments
 (0)