Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Reuse RLPxHandshake ctor
  • Loading branch information
halfalicious committed Apr 25, 2019
commit 2d2720517968f127fb55abf49570cd47bfc050c9
15 changes: 3 additions & 12 deletions libp2p/RLPxHandshake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,14 @@ constexpr size_t c_authCipherSizeBytes = 307;
}

RLPXHandshake::RLPXHandshake(Host* _host, std::shared_ptr<RLPXSocket> const& _socket)
: m_host(_host),
m_originated(false),
m_socket(_socket),
m_idleTimer(m_socket->ref().get_io_service())
{
m_logger.add_attribute(
"Context", boost::log::attributes::constant<std::string>(connectionDirectionString()));
m_errorLogger.add_attribute(
"Context", boost::log::attributes::constant<std::string>(connectionDirectionString()));
crypto::Nonce::get().ref().copyTo(m_nonce.ref());
}
: RLPXHandshake(_host, _socket, {})
{}

RLPXHandshake::RLPXHandshake(
Host* _host, std::shared_ptr<RLPXSocket> const& _socket, NodeID _remote)
: m_host(_host),
m_remote(_remote),
m_originated(true),
m_originated(_remote),
m_socket(_socket),
m_idleTimer(m_socket->ref().get_io_service())
{
Expand Down