mark: PhantomData<T>,
}
-impl <T: sealed::Context> Features<T> {
- pub(crate) fn or(mut self, o: Self) -> Self {
+impl<T: sealed::Context> core::ops::BitOr for Features<T> {
+ type Output = Self;
+
+ fn bitor(mut self, o: Self) -> Self {
let total_feature_len = cmp::max(self.flags.len(), o.flags.len());
self.flags.resize(total_feature_len, 0u8);
for (byte, o_byte) in self.flags.iter_mut().zip(o.flags.iter()) {
peer.set_their_node_id(their_node_id);
insert_node_id!();
let features = self.message_handler.chan_handler.provided_init_features(&their_node_id)
- .or(self.message_handler.route_handler.provided_init_features(&their_node_id))
- .or(self.message_handler.onion_message_handler.provided_init_features(&their_node_id));
+ | self.message_handler.route_handler.provided_init_features(&their_node_id)
+ | self.message_handler.onion_message_handler.provided_init_features(&their_node_id);
let resp = msgs::Init { features, remote_network_address: filter_addresses(peer.their_net_address.clone()) };
self.enqueue_message(peer, &resp);
peer.awaiting_pong_timer_tick_intervals = 0;
peer.set_their_node_id(their_node_id);
insert_node_id!();
let features = self.message_handler.chan_handler.provided_init_features(&their_node_id)
- .or(self.message_handler.route_handler.provided_init_features(&their_node_id))
- .or(self.message_handler.onion_message_handler.provided_init_features(&their_node_id));
+ | self.message_handler.route_handler.provided_init_features(&their_node_id)
+ | self.message_handler.onion_message_handler.provided_init_features(&their_node_id);
let resp = msgs::Init { features, remote_network_address: filter_addresses(peer.their_net_address.clone()) };
self.enqueue_message(peer, &resp);
peer.awaiting_pong_timer_tick_intervals = 0;
addresses.sort_by_key(|addr| addr.get_id());
let features = self.message_handler.chan_handler.provided_node_features()
- .or(self.message_handler.route_handler.provided_node_features())
- .or(self.message_handler.onion_message_handler.provided_node_features());
+ | self.message_handler.route_handler.provided_node_features()
+ | self.message_handler.onion_message_handler.provided_node_features();
let announcement = msgs::UnsignedNodeAnnouncement {
features,
timestamp: self.last_node_announcement_serial.fetch_add(1, Ordering::AcqRel),