|
|
@ -217,9 +217,8 @@ void Host::startPeerSession(Public const& _id, RLP const& _rlp, RLPXFrameIO* _io |
|
|
|
ps->disconnect(DuplicatePeer); |
|
|
|
return; |
|
|
|
} |
|
|
|
m_sessions[_id] = ps; |
|
|
|
} |
|
|
|
ps->start(); |
|
|
|
|
|
|
|
// todo: mutex Session::m_capabilities and move for(:caps) out of mutex.
|
|
|
|
unsigned o = (unsigned)UserPacket; |
|
|
|
for (auto const& i: caps) |
|
|
|
if (haveCapability(i)) |
|
|
@ -227,6 +226,10 @@ void Host::startPeerSession(Public const& _id, RLP const& _rlp, RLPXFrameIO* _io |
|
|
|
ps->m_capabilities[i] = shared_ptr<Capability>(m_capabilities[i]->newPeerCapability(ps.get(), o)); |
|
|
|
o += m_capabilities[i]->messageCount(); |
|
|
|
} |
|
|
|
ps->start(); |
|
|
|
m_sessions[_id] = ps; |
|
|
|
} |
|
|
|
|
|
|
|
clog(NetNote) << "p2p.host.peer.register" << _id.abridged(); |
|
|
|
StructuredLogger::p2pConnected(_id.abridged(), ps->m_peer->peerEndpoint(), ps->m_peer->m_lastConnected, clientVersion, peerCount()); |
|
|
|
} |
|
|
|