X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fln%2Fpeer_handler.rs;fp=src%2Fln%2Fpeer_handler.rs;h=797c55191f680a336a71fd58409d1e9c832f93d9;hb=c43e535bc03404bad16e3d30e5b2fc7215e6ca15;hp=6c2b4d798c4a002ac52c359c2fe2d5d067eefafd;hpb=66fbc66da0c064e4ee271ad5a8e0a37410c80078;p=rust-lightning diff --git a/src/ln/peer_handler.rs b/src/ln/peer_handler.rs index 6c2b4d79..797c5519 100644 --- a/src/ln/peer_handler.rs +++ b/src/ln/peer_handler.rs @@ -374,14 +374,12 @@ impl PeerManager { Ok(x) => x, Err(e) => { match e { - msgs::DecodeError::UnknownRealmByte => return Err(PeerHandleError{ no_connection_possible: false }), + msgs::DecodeError::UnknownVersion => return Err(PeerHandleError{ no_connection_possible: false }), msgs::DecodeError::UnknownRequiredFeature => { log_debug!(self, "Got a channel/node announcement with an known required feature flag, you may want to udpate!"); continue; }, - msgs::DecodeError::BadPublicKey => return Err(PeerHandleError{ no_connection_possible: false }), - msgs::DecodeError::BadSignature => return Err(PeerHandleError{ no_connection_possible: false }), - msgs::DecodeError::BadText => return Err(PeerHandleError{ no_connection_possible: false }), + msgs::DecodeError::InvalidValue => return Err(PeerHandleError{ no_connection_possible: false }), msgs::DecodeError::ShortRead => return Err(PeerHandleError{ no_connection_possible: false }), msgs::DecodeError::ExtraAddressesPerType => { log_debug!(self, "Error decoding message, ignoring due to lnd spec incompatibility. See https://github.com/lightningnetwork/lnd/issues/1407"); @@ -389,7 +387,6 @@ impl PeerManager { }, msgs::DecodeError::BadLengthDescriptor => return Err(PeerHandleError{ no_connection_possible: false }), msgs::DecodeError::Io(_) => return Err(PeerHandleError{ no_connection_possible: false }), - msgs::DecodeError::InvalidValue => panic!("should not happen with message decoding"), } } };