Skip to content

Commit 7b637a3

Browse files
committed
f Wording
1 parent 3a78f60 commit 7b637a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/msgs.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1514,12 +1514,12 @@ impl_writeable!(ChannelAnnouncement, {
15141514

15151515
impl Writeable for UnsignedChannelUpdate {
15161516
fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
1517-
// `must_be_one` used to be `message_flags` but was deprecated in the spec.
1518-
const MUST_BE_ONE: u8 = 1;
1517+
// `message_flags` used to indicate presence of `htlc_maximum_msat`, but was deprecated in the spec.
1518+
const MESSAGE_FLAGS: u8 = 1;
15191519
self.chain_hash.write(w)?;
15201520
self.short_channel_id.write(w)?;
15211521
self.timestamp.write(w)?;
1522-
let all_flags = self.flags as u16 | ((MUST_BE_ONE as u16) << 8);
1522+
let all_flags = self.flags as u16 | ((MESSAGE_FLAGS as u16) << 8);
15231523
all_flags.write(w)?;
15241524
self.cltv_expiry_delta.write(w)?;
15251525
self.htlc_minimum_msat.write(w)?;
@@ -1539,7 +1539,7 @@ impl Readable for UnsignedChannelUpdate {
15391539
timestamp: Readable::read(r)?,
15401540
flags: {
15411541
let flags: u16 = Readable::read(r)?;
1542-
// Note: we ignore `must_be_one`, formely `message_flags`, since it was deprecated by the spec.
1542+
// Note: we ignore the `message_flags` for now, since it was deprecated by the spec.
15431543
flags as u8
15441544
},
15451545
cltv_expiry_delta: Readable::read(r)?,

0 commit comments

Comments
 (0)