projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
9de51f0
)
Merge pull request #2640 from sr-gi/20231003-expose-from-be-bytes
author
Matt Corallo
<649246+TheBlueMatt@users.noreply.github.com>
Thu, 5 Oct 2023 23:45:59 +0000
(23:45 +0000)
committer
GitHub
<noreply@github.com>
Thu, 5 Oct 2023 23:45:59 +0000
(23:45 +0000)
Makes Features::from_be_bytes public
lightning/src/ln/features.rs
patch
|
blob
|
history
diff --git
a/lightning/src/ln/features.rs
b/lightning/src/ln/features.rs
index bcaa91ab266fe7f10ebbc8de710fc30d927365c3..d10c3a71927b254854fd11869f1d9cbaedf7cb35 100644
(file)
--- a/
lightning/src/ln/features.rs
+++ b/
lightning/src/ln/features.rs
@@
-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,