Skip to content

Commit 7b72c6b

Browse files
committed
Makes Features::from_be_bytes public
Downstream projects building Feature<T> are most likely doing so with a big-endian byte array, however only `from_le_bytes` is exposed.
1 parent 9b1b724 commit 7b72c6b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/features.rs

+4
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,10 @@ impl<T: sealed::Context> Features<T> {
718718
Ok(())
719719
}
720720

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
721725
fn from_be_bytes(mut flags: Vec<u8>) -> Features<T> {
722726
flags.reverse(); // Swap to little-endian
723727
Self {

0 commit comments

Comments
 (0)