Browse Source

Windows warning fix.

cl-refactor
Gav Wood 10 years ago
parent
commit
13fbf06eb9
  1. 5
      libp2p/Session.cpp

5
libp2p/Session.cpp

@ -156,7 +156,6 @@ bool Session::interpret(PacketType _t, RLP const& _r)
clogS(NetRight) << _t << _r; clogS(NetRight) << _t << _r;
try // Generic try-catch block designed to capture RLP format errors - TODO: give decent diagnostics, make a bit more specific over what is caught. try // Generic try-catch block designed to capture RLP format errors - TODO: give decent diagnostics, make a bit more specific over what is caught.
{ {
switch (_t) switch (_t)
{ {
case DisconnectPacket: case DisconnectPacket:
@ -185,7 +184,6 @@ bool Session::interpret(PacketType _t, RLP const& _r)
clogS(NetTriviaSummary) << "Latency: " << chrono::duration_cast<chrono::milliseconds>(m_info.lastPing).count() << " ms"; clogS(NetTriviaSummary) << "Latency: " << chrono::duration_cast<chrono::milliseconds>(m_info.lastPing).count() << " ms";
break; break;
case GetPeersPacket: case GetPeersPacket:
{
// Disabled for interop testing. // Disabled for interop testing.
// GetPeers/PeersPacket will be modified to only exchange new nodes which it's peers are interested in. // GetPeers/PeersPacket will be modified to only exchange new nodes which it's peers are interested in.
break; break;
@ -194,7 +192,6 @@ bool Session::interpret(PacketType _t, RLP const& _r)
m_theyRequestedNodes = true; m_theyRequestedNodes = true;
serviceNodesRequest(); serviceNodesRequest();
break; break;
}
case PeersPacket: case PeersPacket:
// Disabled for interop testing. // Disabled for interop testing.
// GetPeers/PeersPacket will be modified to only exchange new nodes which it's peers are interested in. // GetPeers/PeersPacket will be modified to only exchange new nodes which it's peers are interested in.
@ -247,7 +244,6 @@ bool Session::interpret(PacketType _t, RLP const& _r)
} }
break; break;
default: default:
{
for (auto const& i: m_capabilities) for (auto const& i: m_capabilities)
if (_t >= i.second->m_idOffset && _t - i.second->m_idOffset < i.second->hostCapability()->messageCount()) if (_t >= i.second->m_idOffset && _t - i.second->m_idOffset < i.second->hostCapability()->messageCount())
{ {
@ -259,7 +255,6 @@ bool Session::interpret(PacketType _t, RLP const& _r)
return false; return false;
} }
} }
}
catch (std::exception const& _e) catch (std::exception const& _e)
{ {
clogS(NetWarn) << "Peer causing an exception:" << _e.what() << _r; clogS(NetWarn) << "Peer causing an exception:" << _e.what() << _r;

Loading…
Cancel
Save