Skip to content

Commit dc3f826

Browse files
committed
(Re-)add handling for ChannelUpdate::message_flags
When the `htlc_maximum_msat` field was made mandatory in `ChannelUpdate` (in b0e8b73) we started ignoring the `message_flags` field entirely and always writing `1`. The comment updates indicated that the `message_flags` field was deprecated, but this is not true - only the `htlc_maximum_msat` indicator bit was deprecated, requiring it to be 1. If a node creates a `channel_update` with `message_flags` bits set other than the low bit, this will cause us to spuriously reject the message with an invalid signature error as we will check the message against the wrong hash. With today's current spec this is totally fine - the only other bit defined for `message_flags` is the `dont_forward` bit, which when set indicates we shouldn't accept the message into our gossip store anyway (though this may lead to spurious `warning` messages being sent to peers). However, in the future this may mean we start rejecting valid `channel_update`s if new bits are defiend.
1 parent 88e1b56 commit dc3f826

18 files changed

+333
-184
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
10691069
events::MessageSendEvent::SendChannelReady { .. } => continue,
10701070
events::MessageSendEvent::SendAnnouncementSignatures { .. } => continue,
10711071
events::MessageSendEvent::SendChannelUpdate { ref node_id, ref msg } => {
1072-
assert_eq!(msg.contents.flags & 2, 0); // The disable bit must never be set!
1072+
assert_eq!(msg.contents.channel_flags & 2, 0); // The disable bit must never be set!
10731073
if Some(*node_id) == expect_drop_id { panic!("peer_disconnected should drop msgs bound for the disconnected peer"); }
10741074
*node_id == a_id
10751075
},
@@ -1207,7 +1207,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
12071207
// the "disabled" bit, as we should never ever have a channel which is
12081208
// disabled when we send such an update (or it may indicate channel
12091209
// force-close which we should detect as an error).
1210-
assert_eq!(msg.contents.flags & 2, 0);
1210+
assert_eq!(msg.contents.channel_flags & 2, 0);
12111211
},
12121212
_ => if out.may_fail.load(atomic::Ordering::Acquire) {
12131213
return;
@@ -1249,7 +1249,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
12491249
events::MessageSendEvent::SendChannelReady { .. } => {},
12501250
events::MessageSendEvent::SendAnnouncementSignatures { .. } => {},
12511251
events::MessageSendEvent::SendChannelUpdate { ref msg, .. } => {
1252-
assert_eq!(msg.contents.flags & 2, 0); // The disable bit must never be set!
1252+
assert_eq!(msg.contents.channel_flags & 2, 0); // The disable bit must never be set!
12531253
},
12541254
_ => {
12551255
if out.may_fail.load(atomic::Ordering::Acquire) {
@@ -1275,7 +1275,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
12751275
events::MessageSendEvent::SendChannelReady { .. } => {},
12761276
events::MessageSendEvent::SendAnnouncementSignatures { .. } => {},
12771277
events::MessageSendEvent::SendChannelUpdate { ref msg, .. } => {
1278-
assert_eq!(msg.contents.flags & 2, 0); // The disable bit must never be set!
1278+
assert_eq!(msg.contents.channel_flags & 2, 0); // The disable bit must never be set!
12791279
},
12801280
_ => {
12811281
if out.may_fail.load(atomic::Ordering::Acquire) {

fuzz/src/full_stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ mod tests {
17791779

17801780
let log_entries = logger.lines.lock().unwrap();
17811781
assert_eq!(log_entries.get(&("lightning::ln::peer_handler".to_string(), "Sending message to all peers except Some(PublicKey(0000000000000000000000000000000000000000000000000000000000000002ff00000000000000000000000000000000000000000000000000000000000002)) or the announced channel's counterparties: ChannelAnnouncement { node_signature_1: 3026020200b202200303030303030303030303030303030303030303030303030303030303030303, node_signature_2: 3026020200b202200202020202020202020202020202020202020202020202020202020202020202, bitcoin_signature_1: 3026020200b202200303030303030303030303030303030303030303030303030303030303030303, bitcoin_signature_2: 3026020200b202200202020202020202020202020202020202020202020202020202020202020202, contents: UnsignedChannelAnnouncement { features: [], chain_hash: 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000, short_channel_id: 42, node_id_1: NodeId(030303030303030303030303030303030303030303030303030303030303030303), node_id_2: NodeId(020202020202020202020202020202020202020202020202020202020202020202), bitcoin_key_1: NodeId(030303030303030303030303030303030303030303030303030303030303030303), bitcoin_key_2: NodeId(020202020202020202020202020202020202020202020202020202020202020202), excess_data: [] } }".to_string())), Some(&1));
1782-
assert_eq!(log_entries.get(&("lightning::ln::peer_handler".to_string(), "Sending message to all peers except Some(PublicKey(0000000000000000000000000000000000000000000000000000000000000002ff00000000000000000000000000000000000000000000000000000000000002)): ChannelUpdate { signature: 3026020200a602200303030303030303030303030303030303030303030303030303030303030303, contents: UnsignedChannelUpdate { chain_hash: 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000, short_channel_id: 42, timestamp: 44, flags: 0, cltv_expiry_delta: 40, htlc_minimum_msat: 0, htlc_maximum_msat: 100000000, fee_base_msat: 0, fee_proportional_millionths: 0, excess_data: [] } }".to_string())), Some(&1));
1782+
assert_eq!(log_entries.get(&("lightning::ln::peer_handler".to_string(), "Sending message to all peers except Some(PublicKey(0000000000000000000000000000000000000000000000000000000000000002ff00000000000000000000000000000000000000000000000000000000000002)): ChannelUpdate { signature: 3026020200a602200303030303030303030303030303030303030303030303030303030303030303, contents: UnsignedChannelUpdate { chain_hash: 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000, short_channel_id: 42, timestamp: 44, message_flags: 1, channel_flags: 0, cltv_expiry_delta: 40, htlc_minimum_msat: 0, htlc_maximum_msat: 100000000, fee_base_msat: 0, fee_proportional_millionths: 0, excess_data: [] } }".to_string())), Some(&1));
17831783
assert_eq!(log_entries.get(&("lightning::ln::peer_handler".to_string(), "Sending message to all peers except Some(PublicKey(0000000000000000000000000000000000000000000000000000000000000002ff00000000000000000000000000000000000000000000000000000000000002)) or the announced node: NodeAnnouncement { signature: 302502012802200303030303030303030303030303030303030303030303030303030303030303, contents: UnsignedNodeAnnouncement { features: [], timestamp: 43, node_id: NodeId(030303030303030303030303030303030303030303030303030303030303030303), rgb: [0, 0, 0], alias: NodeAlias([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), addresses: [], excess_address_data: [], excess_data: [] } }".to_string())), Some(&1));
17841784
}
17851785
}

lightning-rapid-gossip-sync/src/processing.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ where
370370
chain_hash,
371371
short_channel_id,
372372
timestamp: backdated_timestamp,
373-
flags: standard_channel_flags,
373+
message_flags: 1, // Only must_be_one
374+
channel_flags: standard_channel_flags,
374375
cltv_expiry_delta: default_cltv_expiry_delta,
375376
htlc_minimum_msat: default_htlc_minimum_msat,
376377
htlc_maximum_msat: default_htlc_maximum_msat,

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ fn test_monitor_update_fail_reestablish() {
11301130
nodes[1].node.handle_channel_reestablish(&nodes[0].node.get_our_node_id(), &as_reestablish);
11311131
assert_eq!(
11321132
get_event_msg!(nodes[0], MessageSendEvent::SendChannelUpdate, nodes[1].node.get_our_node_id())
1133-
.contents.flags & 2, 0); // The "disabled" bit should be unset as we just reconnected
1133+
.contents.channel_flags & 2, 0); // The "disabled" bit should be unset as we just reconnected
11341134

11351135
nodes[1].node.get_and_clear_pending_msg_events(); // Free the holding cell
11361136
check_added_monitors!(nodes[1], 1);
@@ -1151,13 +1151,13 @@ fn test_monitor_update_fail_reestablish() {
11511151
nodes[0].node.handle_channel_reestablish(&nodes[1].node.get_our_node_id(), &bs_reestablish);
11521152
assert_eq!(
11531153
get_event_msg!(nodes[0], MessageSendEvent::SendChannelUpdate, nodes[1].node.get_our_node_id())
1154-
.contents.flags & 2, 0); // The "disabled" bit should be unset as we just reconnected
1154+
.contents.channel_flags & 2, 0); // The "disabled" bit should be unset as we just reconnected
11551155

11561156
nodes[1].node.handle_channel_reestablish(&nodes[0].node.get_our_node_id(), &as_reestablish);
11571157
check_added_monitors!(nodes[1], 0);
11581158
assert_eq!(
11591159
get_event_msg!(nodes[1], MessageSendEvent::SendChannelUpdate, nodes[0].node.get_our_node_id())
1160-
.contents.flags & 2, 0); // The "disabled" bit should be unset as we just reconnected
1160+
.contents.channel_flags & 2, 0); // The "disabled" bit should be unset as we just reconnected
11611161

11621162
chanmon_cfgs[1].persister.set_update_ret(ChannelMonitorUpdateStatus::Completed);
11631163
let (outpoint, latest_update, _) = nodes[1].chain_monitor.latest_monitor_update_id.lock().unwrap().get(&chan_1.2).unwrap().clone();

lightning/src/ln/channel.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9894,7 +9894,8 @@ mod tests {
98949894
chain_hash,
98959895
short_channel_id: 0,
98969896
timestamp: 0,
9897-
flags: 0,
9897+
message_flags: 1, // Only must_be_one
9898+
channel_flags: 0,
98989899
cltv_expiry_delta: 100,
98999900
htlc_minimum_msat: 5,
99009901
htlc_maximum_msat: MAX_VALUE_MSAT,

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3505,7 +3505,7 @@ where
35053505
// peer has been disabled for some time), return `channel_disabled`,
35063506
// otherwise return `temporary_channel_failure`.
35073507
let chan_update_opt = self.get_channel_update_for_onion(next_packet.outgoing_scid, chan).ok();
3508-
if chan_update_opt.as_ref().map(|u| u.contents.flags & 2 == 2).unwrap_or(false) {
3508+
if chan_update_opt.as_ref().map(|u| u.contents.channel_flags & 2 == 2).unwrap_or(false) {
35093509
return Err(("Forwarding channel has been disconnected for some time.", 0x1000 | 20, chan_update_opt));
35103510
} else {
35113511
return Err(("Forwarding channel is not in a ready state.", 0x1000 | 7, chan_update_opt));
@@ -3784,7 +3784,8 @@ where
37843784
chain_hash: self.chain_hash,
37853785
short_channel_id,
37863786
timestamp: chan.context.get_update_time_counter(),
3787-
flags: (!were_node_one) as u8 | ((!enabled as u8) << 1),
3787+
message_flags: 1, // Only must_be_one
3788+
channel_flags: (!were_node_one) as u8 | ((!enabled as u8) << 1),
37883789
cltv_expiry_delta: chan.context.get_cltv_expiry_delta(),
37893790
htlc_minimum_msat: chan.context.get_counterparty_htlc_minimum_msat(),
37903791
htlc_maximum_msat: chan.context.get_announced_htlc_max_msat(),
@@ -7920,7 +7921,7 @@ where
79207921
return Err(MsgHandleErrInternal::send_err_msg_no_close("Got a channel_update for a channel from the wrong node - it shouldn't know about our private channels!".to_owned(), chan_id));
79217922
}
79227923
let were_node_one = self.get_our_node_id().serialize()[..] < chan.context.get_counterparty_node_id().serialize()[..];
7923-
let msg_from_node_one = msg.contents.flags & 1 == 0;
7924+
let msg_from_node_one = msg.contents.channel_flags & 1 == 0;
79247925
if were_node_one == msg_from_node_one {
79257926
return Ok(NotifyOption::SkipPersistNoEvents);
79267927
} else {
@@ -12236,8 +12237,8 @@ mod tests {
1223612237
// update message and would always update the local fee info, even if our peer was
1223712238
// (spuriously) forwarding us our own channel_update.
1223812239
let as_node_one = nodes[0].node.get_our_node_id().serialize()[..] < nodes[1].node.get_our_node_id().serialize()[..];
12239-
let as_update = if as_node_one == (chan.0.contents.flags & 1 == 0 /* chan.0 is from node one */) { &chan.0 } else { &chan.1 };
12240-
let bs_update = if as_node_one == (chan.0.contents.flags & 1 == 0 /* chan.0 is from node one */) { &chan.1 } else { &chan.0 };
12240+
let as_update = if as_node_one == (chan.0.contents.channel_flags & 1 == 0 /* chan.0 is from node one */) { &chan.0 } else { &chan.1 };
12241+
let bs_update = if as_node_one == (chan.0.contents.channel_flags & 1 == 0 /* chan.0 is from node one */) { &chan.1 } else { &chan.0 };
1224112242

1224212243
// First deliver each peers' own message, checking that the node doesn't need to be
1224312244
// persisted and that its channel info remains the same.

lightning/src/ln/functional_test_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ macro_rules! get_closing_signed_broadcast {
15541554
assert!(events.len() == 1 || events.len() == 2);
15551555
(match events[events.len() - 1] {
15561556
MessageSendEvent::BroadcastChannelUpdate { ref msg } => {
1557-
assert_eq!(msg.contents.flags & 2, 2);
1557+
assert_eq!(msg.contents.channel_flags & 2, 2);
15581558
msg.clone()
15591559
},
15601560
_ => panic!("Unexpected event"),
@@ -1613,7 +1613,7 @@ pub fn check_closed_broadcast(node: &Node, num_channels: usize, with_error_msg:
16131613
msg_events.into_iter().filter_map(|msg_event| {
16141614
match msg_event {
16151615
MessageSendEvent::BroadcastChannelUpdate { ref msg } => {
1616-
assert_eq!(msg.contents.flags & 2, 2);
1616+
assert_eq!(msg.contents.channel_flags & 2, 2);
16171617
None
16181618
},
16191619
MessageSendEvent::HandleError { action: msgs::ErrorAction::SendErrorMessage { msg }, node_id: _ } => {

lightning/src/ln/functional_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7403,7 +7403,7 @@ fn test_announce_disable_channels() {
74037403
for e in msg_events {
74047404
match e {
74057405
MessageSendEvent::BroadcastChannelUpdate { ref msg } => {
7406-
assert_eq!(msg.contents.flags & (1<<1), 1<<1); // The "channel disabled" bit should be set
7406+
assert_eq!(msg.contents.channel_flags & (1<<1), 1<<1); // The "channel disabled" bit should be set
74077407
// Check that each channel gets updated exactly once
74087408
if chans_disabled.insert(msg.contents.short_channel_id, msg.contents.timestamp).is_some() {
74097409
panic!("Generated ChannelUpdate for wrong chan!");
@@ -7450,7 +7450,7 @@ fn test_announce_disable_channels() {
74507450
for e in msg_events {
74517451
match e {
74527452
MessageSendEvent::BroadcastChannelUpdate { ref msg } => {
7453-
assert_eq!(msg.contents.flags & (1<<1), 0); // The "channel disabled" bit should be off
7453+
assert_eq!(msg.contents.channel_flags & (1<<1), 0); // The "channel disabled" bit should be off
74547454
match chans_disabled.remove(&msg.contents.short_channel_id) {
74557455
// Each update should have a higher timestamp than the previous one, replacing
74567456
// the old one.
@@ -9396,13 +9396,13 @@ fn test_error_chans_closed() {
93969396
assert_eq!(events.len(), 2);
93979397
match events[0] {
93989398
MessageSendEvent::BroadcastChannelUpdate { ref msg } => {
9399-
assert_eq!(msg.contents.flags & 2, 2);
9399+
assert_eq!(msg.contents.channel_flags & 2, 2);
94009400
},
94019401
_ => panic!("Unexpected event"),
94029402
}
94039403
match events[1] {
94049404
MessageSendEvent::BroadcastChannelUpdate { ref msg } => {
9405-
assert_eq!(msg.contents.flags & 2, 2);
9405+
assert_eq!(msg.contents.channel_flags & 2, 2);
94069406
},
94079407
_ => panic!("Unexpected event"),
94089408
}

lightning/src/ln/msgs.rs

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,11 @@ pub struct UnsignedChannelUpdate {
12271227
pub short_channel_id: u64,
12281228
/// A strictly monotonic announcement counter, with gaps allowed, specific to this channel
12291229
pub timestamp: u32,
1230-
/// Channel flags
1231-
pub flags: u8,
1230+
/// Flags pertaining to this message.
1231+
pub message_flags: u8,
1232+
/// Flags pertaining to the channel, including to which direction in the channel this update
1233+
/// applies and whether the direction is currently able to forward HTLCs.
1234+
pub channel_flags: u8,
12321235
/// The number of blocks such that if:
12331236
/// `incoming_htlc.cltv_expiry < outgoing_htlc.cltv_expiry + cltv_expiry_delta`
12341237
/// then we need to fail the HTLC backwards. When forwarding an HTLC, `cltv_expiry_delta` determines
@@ -2866,13 +2869,13 @@ impl_writeable!(ChannelAnnouncement, {
28662869

28672870
impl Writeable for UnsignedChannelUpdate {
28682871
fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
2869-
// `message_flags` used to indicate presence of `htlc_maximum_msat`, but was deprecated in the spec.
2870-
const MESSAGE_FLAGS: u8 = 1;
28712872
self.chain_hash.write(w)?;
28722873
self.short_channel_id.write(w)?;
28732874
self.timestamp.write(w)?;
2874-
let all_flags = self.flags as u16 | ((MESSAGE_FLAGS as u16) << 8);
2875-
all_flags.write(w)?;
2875+
// Thw low bit of message_flags used to indicate the presence of `htlc_maximum_msat`, and
2876+
// now must be set
2877+
(self.message_flags | 1).write(w)?;
2878+
self.channel_flags.write(w)?;
28762879
self.cltv_expiry_delta.write(w)?;
28772880
self.htlc_minimum_msat.write(w)?;
28782881
self.fee_base_msat.write(w)?;
@@ -2885,22 +2888,26 @@ impl Writeable for UnsignedChannelUpdate {
28852888

28862889
impl Readable for UnsignedChannelUpdate {
28872890
fn read<R: Read>(r: &mut R) -> Result<Self, DecodeError> {
2888-
Ok(Self {
2891+
let res = Self {
28892892
chain_hash: Readable::read(r)?,
28902893
short_channel_id: Readable::read(r)?,
28912894
timestamp: Readable::read(r)?,
2892-
flags: {
2893-
let flags: u16 = Readable::read(r)?;
2894-
// Note: we ignore the `message_flags` for now, since it was deprecated by the spec.
2895-
flags as u8
2896-
},
2895+
message_flags: Readable::read(r)?,
2896+
channel_flags: Readable::read(r)?,
28972897
cltv_expiry_delta: Readable::read(r)?,
28982898
htlc_minimum_msat: Readable::read(r)?,
28992899
fee_base_msat: Readable::read(r)?,
29002900
fee_proportional_millionths: Readable::read(r)?,
29012901
htlc_maximum_msat: Readable::read(r)?,
29022902
excess_data: read_to_end(r)?,
2903-
})
2903+
};
2904+
if res.message_flags & 1 != 1 {
2905+
// The `must_be_one` flag should be set (historically it indicated the presence of the
2906+
// `htlc_maximum_msat` field, which is now required).
2907+
Err(DecodeError::InvalidValue)
2908+
} else {
2909+
Ok(res)
2910+
}
29042911
}
29052912
}
29062913

@@ -3496,7 +3503,8 @@ mod tests {
34963503
chain_hash: ChainHash::using_genesis_block(Network::Bitcoin),
34973504
short_channel_id: 2316138423780173,
34983505
timestamp: 20190119,
3499-
flags: if direction { 1 } else { 0 } | if disable { 1 << 1 } else { 0 },
3506+
message_flags: 1, // Only must_be_one
3507+
channel_flags: if direction { 1 } else { 0 } | if disable { 1 << 1 } else { 0 },
35003508
cltv_expiry_delta: 144,
35013509
htlc_minimum_msat: 1000000,
35023510
htlc_maximum_msat: 131355275467161,

lightning/src/ln/onion_route_tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ impl msgs::ChannelUpdate {
238238
chain_hash: ChainHash::from(BlockHash::hash(&vec![0u8][..]).as_ref()),
239239
short_channel_id,
240240
timestamp: 0,
241-
flags: 0,
241+
message_flags: 1, // Only must_be_one
242+
channel_flags: 0,
242243
cltv_expiry_delta: 0,
243244
htlc_minimum_msat: 0,
244245
htlc_maximum_msat: msgs::MAX_VALUE_MSAT,

lightning/src/ln/priv_short_conf_tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ fn test_scid_alias_returned() {
508508
chain_hash: ChainHash::using_genesis_block(Network::Testnet),
509509
short_channel_id: last_hop[0].inbound_scid_alias.unwrap(),
510510
timestamp: 21,
511-
flags: 1,
511+
message_flags: 1, // Only must_be_one
512+
channel_flags: 1,
512513
cltv_expiry_delta: accept_forward_cfg.channel_config.cltv_expiry_delta,
513514
htlc_minimum_msat: 1_000,
514515
htlc_maximum_msat: 1_000_000, // Defaults to 10% of the channel value

lightning/src/ln/shutdown_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ fn do_test_shutdown_rebroadcast(recv_count: u8) {
577577
node_0_2nd_shutdown
578578
} else {
579579
let node_0_chan_update = get_event_msg!(nodes[0], MessageSendEvent::SendChannelUpdate, nodes[1].node.get_our_node_id());
580-
assert_eq!(node_0_chan_update.contents.flags & 2, 0); // "disabled" flag must not be set as we just reconnected.
580+
assert_eq!(node_0_chan_update.contents.channel_flags & 2, 0); // "disabled" flag must not be set as we just reconnected.
581581
nodes[0].node.handle_shutdown(&nodes[1].node.get_our_node_id(), &node_1_2nd_shutdown);
582582
get_event_msg!(nodes[0], MessageSendEvent::SendShutdown, nodes[1].node.get_our_node_id())
583583
};
@@ -1188,7 +1188,7 @@ fn do_test_closing_signed_reinit_timeout(timeout_step: TimeoutStep) {
11881188
assert_eq!(events.len(), 1);
11891189
match events[0] {
11901190
MessageSendEvent::BroadcastChannelUpdate { ref msg } => {
1191-
assert_eq!(msg.contents.flags & 2, 2);
1191+
assert_eq!(msg.contents.channel_flags & 2, 2);
11921192
},
11931193
_ => panic!("Unexpected event"),
11941194
}

0 commit comments

Comments
 (0)