diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-08-24 19:54:13 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-08-26 10:27:52 +0200 |
commit | fa786570a5fdf6723b35883054f9f840a3440f92 (patch) | |
tree | 3797ea254a766dbf9ff8d6d9ae221c20da9eee1f /src/net.cpp | |
parent | fa82f4ea96749115311cffa0919d49d383c4d28b (diff) |
Remove unused RecursiveMutex cs_addrName
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net.cpp b/src/net.cpp index 51d9c7f590..97b3c42d96 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -530,9 +530,9 @@ std::string ConnectionTypeAsString(ConnectionType conn_type) assert(false); } -std::string CNode::GetAddrName() const { - LOCK(cs_addrName); - return addrName; +std::string CNode::GetAddrName() const +{ + return m_addr_name; } CService CNode::GetAddrLocal() const @@ -2956,6 +2956,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, SOCKET hSocketIn, const : nTimeConnected(GetTimeSeconds()), addr(addrIn), addrBind(addrBindIn), + m_addr_name{addrNameIn.empty() ? addr.ToStringIPPort() : addrNameIn}, m_inbound_onion(inbound_onion), nKeyedNetGroup(nKeyedNetGroupIn), id(idIn), @@ -2965,7 +2966,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, SOCKET hSocketIn, const { if (inbound_onion) assert(conn_type_in == ConnectionType::INBOUND); hSocket = hSocketIn; - addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn; if (conn_type_in != ConnectionType::BLOCK_RELAY) { m_tx_relay = std::make_unique<TxRelay>(); } @@ -2975,7 +2975,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, SOCKET hSocketIn, const mapRecvBytesPerMsgCmd[NET_MESSAGE_COMMAND_OTHER] = 0; if (fLogIPs) { - LogPrint(BCLog::NET, "Added connection to %s peer=%d\n", addrName, id); + LogPrint(BCLog::NET, "Added connection to %s peer=%d\n", m_addr_name, id); } else { LogPrint(BCLog::NET, "Added connection peer=%d\n", id); } |