mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 15:02:20 +01:00
Merge pull request #2640 from sr-gi/20231003-expose-from-be-bytes
Makes Features::from_be_bytes public
This commit is contained in:
commit
eea19de198
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
/// most on-the-wire encodings.
|
||||
///
|
||||
/// This is not exported to bindings users as we don't support export across multiple T
|
||||
pub fn from_be_bytes(mut flags: Vec<u8>) -> Features<T> {
|
||||
flags.reverse(); // Swap to little-endian
|
||||
Self {
|
||||
flags,
|
||||
|
|
Loading…
Add table
Reference in a new issue