Skip to content

Commit 6ecb0d9

Browse files
committed
f comment and newline
1 parent 49aefd4 commit 6ecb0d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/features.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ impl<T: sealed::Context> Features<T> {
610610
}
611611
Ok(())
612612
}
613+
613614
fn from_be_bytes(mut flags: Vec<u8>) -> Features<T> {
614615
flags.reverse(); // Swap to little-endian
615616
Self {
@@ -777,6 +778,9 @@ impl_feature_len_prefixed_write!(ChannelFeatures);
777778
impl_feature_len_prefixed_write!(NodeFeatures);
778779
impl_feature_len_prefixed_write!(InvoiceFeatures);
779780

781+
// Because ChannelTypeFeatures only appears inside of TLVs, it doesn't have a length prefix when
782+
// serialized. Thus, we can't use `impl_feature_len_prefixed_write`, above, and have to write our
783+
// own serialization.
780784
impl Writeable for ChannelTypeFeatures {
781785
fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
782786
self.write_be(w)

0 commit comments

Comments
 (0)