Skip to content

Commit

Permalink
f Wording
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Jul 19, 2022
1 parent 3a78f60 commit 7b637a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lightning/src/ln/msgs.rs
Expand Up @@ -1514,12 +1514,12 @@ impl_writeable!(ChannelAnnouncement, {

impl Writeable for UnsignedChannelUpdate {
fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
// `must_be_one` used to be `message_flags` but was deprecated in the spec.
const MUST_BE_ONE: u8 = 1;
// `message_flags` used to indicate presence of `htlc_maximum_msat`, but was deprecated in the spec.
const MESSAGE_FLAGS: u8 = 1;
self.chain_hash.write(w)?;
self.short_channel_id.write(w)?;
self.timestamp.write(w)?;
let all_flags = self.flags as u16 | ((MUST_BE_ONE as u16) << 8);
let all_flags = self.flags as u16 | ((MESSAGE_FLAGS as u16) << 8);
all_flags.write(w)?;
self.cltv_expiry_delta.write(w)?;
self.htlc_minimum_msat.write(w)?;
Expand All @@ -1539,7 +1539,7 @@ impl Readable for UnsignedChannelUpdate {
timestamp: Readable::read(r)?,
flags: {
let flags: u16 = Readable::read(r)?;
// Note: we ignore `must_be_one`, formely `message_flags`, since it was deprecated by the spec.
// Note: we ignore the `message_flags` for now, since it was deprecated by the spec.
flags as u8
},
cltv_expiry_delta: Readable::read(r)?,
Expand Down

0 comments on commit 7b637a3

Please sign in to comment.