Skip to content

Commit aba0335

Browse files
committed
[net processing] Remove CNodeState.name
This has been unused since logging peer IPs was removed from Misbehaving() in a8865f8.
1 parent ce3bdd0 commit aba0335

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,6 @@ struct CNodeState {
280280
int nMisbehavior;
281281
//! Whether this peer should be disconnected and marked as discouraged (unless it has the noban permission).
282282
bool m_should_discourage;
283-
//! String name of this peer (debugging/logging purposes).
284-
const std::string name;
285283
//! The best known block we know this peer has announced.
286284
const CBlockIndex *pindexBestKnownBlock;
287285
//! The hash of the last unknown block this peer has announced.
@@ -430,9 +428,8 @@ struct CNodeState {
430428
//! Whether this peer relays txs via wtxid
431429
bool m_wtxid_relay{false};
432430

433-
CNodeState(CAddress addrIn, std::string addrNameIn, bool is_inbound, bool is_manual) :
434-
address(addrIn), name(std::move(addrNameIn)), m_is_inbound(is_inbound),
435-
m_is_manual_connection (is_manual)
431+
CNodeState(CAddress addrIn, bool is_inbound, bool is_manual)
432+
: address(addrIn), m_is_inbound(is_inbound), m_is_manual_connection(is_manual)
436433
{
437434
fCurrentlyConnected = false;
438435
nMisbehavior = 0;
@@ -839,7 +836,7 @@ void PeerLogicValidation::InitializeNode(CNode *pnode) {
839836
NodeId nodeid = pnode->GetId();
840837
{
841838
LOCK(cs_main);
842-
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(addr, std::move(addrName), pnode->IsInboundConn(), pnode->IsManualConn()));
839+
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(addr, pnode->IsInboundConn(), pnode->IsManualConn()));
843840
}
844841
if(!pnode->IsInboundConn())
845842
PushNodeVersion(*pnode, *connman, GetTime());

0 commit comments

Comments
 (0)