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