Skip to content

Commit 20befe2

Browse files
committed
review: Remove legacy (local/global) feature flag notation
* Remove local/global naming when processing INIT message contents * Remove duplicate requires_unknown_bits() check
1 parent 0aa04ea commit 20befe2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lightning/src/ln/peers/handler.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -694,16 +694,12 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, TransportImpl
694694
// Returns a valid PostInitState given a Init message
695695
fn post_init_state_from_init_message(&self, init_message: &msgs::Init, their_node_id: &PublicKey) -> Result<PostInitState, PeerHandleError> {
696696
if init_message.features.requires_unknown_bits() {
697-
log_info!(self.logger, "Peer global features required unknown version bits");
698-
return Err(PeerHandleError { no_connection_possible: true }.into());
699-
}
700-
if init_message.features.requires_unknown_bits() {
701-
log_info!(self.logger, "Peer local features required unknown version bits");
697+
log_info!(self.logger, "Peer features required unknown version bits");
702698
return Err(PeerHandleError { no_connection_possible: true }.into());
703699
}
704700

705701
log_info!(
706-
self.logger, "Received peer Init message: data_loss_protect: {}, initial_routing_sync: {}, upfront_shutdown_script: {}, static_remote_key: {}, unknown flags (local and global): {}",
702+
self.logger, "Received peer Init message: data_loss_protect: {}, initial_routing_sync: {}, upfront_shutdown_script: {}, static_remote_key: {}, unknown flags: {}",
707703
if init_message.features.supports_data_loss_protect() { "supported" } else { "not supported"},
708704
if init_message.features.initial_routing_sync() { "requested" } else { "not requested" },
709705
if init_message.features.supports_upfront_shutdown_script() { "supported" } else { "not supported"},

0 commit comments

Comments
 (0)