Add a no-bindings-map comment to `std::io::ErrorKind` in DecodeErr
[rust-lightning] / lightning / src / ln / peer_handler.rs
index 742b1ff3a1fffa81de8ec1549746f366bf0eca52..0e9facb8ac888aee43711439a1453085533eb536 100644 (file)
@@ -90,6 +90,7 @@ pub trait SocketDescriptor : cmp::Eq + hash::Hash + Clone {
 /// Error for PeerManager errors. If you get one of these, you must disconnect the socket and
 /// generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the
 /// descriptor.
+#[derive(Clone)]
 pub struct PeerHandleError {
        /// Used to indicate that we probably can't make any future connections to this peer, implying
        /// we should go ahead and force-close any channels we have with it.
@@ -676,11 +677,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref> PeerManager<D
                        // Setup and Control messages:
                        wire::Message::Init(msg) => {
                                if msg.features.requires_unknown_bits() {
-                                       log_info!(self.logger, "Peer global features required unknown version bits");
-                                       return Err(PeerHandleError{ no_connection_possible: true }.into());
-                               }
-                               if msg.features.requires_unknown_bits() {
-                                       log_info!(self.logger, "Peer local features required unknown version bits");
+                                       log_info!(self.logger, "Peer features required unknown version bits");
                                        return Err(PeerHandleError{ no_connection_possible: true }.into());
                                }
                                if peer.their_features.is_some() {