From b7fa15dfaec713cf4cb6b181c5c12683a7d1b108 Mon Sep 17 00:00:00 2001 From: Daniel Hams Date: Mon, 10 Feb 2014 16:09:15 +0000 Subject: [PATCH] Peer listen port is mandatory in the hello so remove an unnecessary test. --- libethereum/PeerNetwork.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libethereum/PeerNetwork.cpp b/libethereum/PeerNetwork.cpp index a32a0fa43..7a43bcc69 100644 --- a/libethereum/PeerNetwork.cpp +++ b/libethereum/PeerNetwork.cpp @@ -120,8 +120,7 @@ bool PeerSession::interpret(RLP const& _r) m_networkId = _r[2].toInt(); auto clientVersion = _r[3].toString(); m_caps = _r[4].toInt(); - if (_r.itemCount() > 5) - m_listenPort = _r[5].toInt(); + m_listenPort = _r[5].toInt(); m_id = _r[6].toHash(); clogS(NetMessageSummary) << "Hello: " << clientVersion << "V[" << m_protocolVersion << "/" << m_networkId << "]" << asHex(m_id.ref().cropped(0, 4)) << showbase << hex << m_caps << dec << m_listenPort;